Fix random memory corruption during suspend-to-RAM resume
Hi!
We really want to use wakeup_stack as stack, not as pointer to stack... Please apply,
Pavel
arch/i386/kernel/acpi_wakeup.S +1 -1
@@ -31,7 +31,7 @@ movw %cs, %ax movw %ax, %ds # Make ds:0 point to wakeup_start movw %ax, %ss - mov wakeup_stack - wakeup_code, %sp # Private stack is needed for ASUS board + mov $(wakeup_stack - wakeup_code), %sp # Private stack is needed for ASUS board movw $0x0e00 + 'S', %fs:(0x12) pushl $0 # Kill any dangerous flags
Signature · 2 lines
Worst form of spam? Adding advertisment signatures ala sourceforge.net. What goes next? Inserting advertisment *into* email?
Quoted 3 lines · Pavel Machek
We really want to use
wakeup_stackas stack, not as pointer to stack... Please apply,
Hmm.. The stack grows downwards, are you sure you don't really mean
mov $(wakeup_end-wakeup_code),%sp
(because wakeup_end is the end of the wakeup_stack area..)
Linus
Hi!
Quoted 8 lines
Quoted 2 lines
We really want to use
wakeup_stackas stack, not as pointer to stack... Please apply,Hmm.. The stack grows downwards, are you sure you don't really mean
mov $(wakeup_end-wakeup_code),%sp(because
wakeup_endis the end of thewakeup_stackarea..)
Yes, I'm sure:
.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
wakeup_stack:
.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0Okay, I might want to kill the second set of longs ;-).
I need to substract wakeup_code because code is being relocated in quite a strange way.
Pavel
Signature · 2 lines
Casualities in World Trade Center: ~3k dead inside the building, cryptography in U.S.A. and free speech in Czech Republic.
Quoted 8 lines · Pavel Machek
Quoted 6 lines
Hmm.. The stack grows downwards, are you sure you don't really mean
mov $(wakeup_end-wakeup_code),%sp(because
wakeup_endis the end of thewakeup_stackarea..)Yes, I'm sure:
No. The code is crap. Please send a _fixed_ patch that clearly puts the stack pointer at the _end_ of the stack.
What you are sure of is that is _happens_ to work by pure luck.
I'd rather have known-broken code in the kernel than code that works by mistake. The former at least gets fixed.
Linus
Hi!
Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
Hmm.. The stack grows downwards, are you sure you don't really mean
mov $(wakeup_end-wakeup_code),%sp(because
wakeup_endis the end of thewakeup_stackarea..)Yes, I'm sure:
Quoted 7 lines
No. The code is crap. Please send a _fixed_ patch that clearly puts the stack pointer at the _end_ of the stack.
What you are sure of is that is _happens_ to work by pure luck.
I'd rather have known-broken code in the kernel than code that works by mistake. The former at least gets fixed.
It should be already in the queue (waiting on my home machine sorry), along with fix to make it all fit in one page.
Pavel
Signature · 2 lines
Casualities in World Trade Center: ~3k dead inside the building, cryptography in U.S.A. and free speech in Czech Republic.