* Fix random memory corruption during suspend-to-RAM resume
@ 2003-02-09 20:31 Pavel Machek
2003-02-10 17:36 ` Linus Torvalds
0 siblings, 1 reply; 5+ messages in thread
From: Pavel Machek @ 2003-02-09 20:31 UTC (permalink / raw)
To: torvalds, kernel list, Rusty trivial patch monkey Russell
Hi!
We really want to use wakeup_stack as stack, not as pointer to
stack... Please apply,
Pavel
--- clean/arch/i386/kernel/acpi_wakeup.S 2002-12-18 22:20:47.000000000 +0100
+++ linux-swsusp/arch/i386/kernel/acpi_wakeup.S 2003-02-09 21:13:19.000000000 +0100
@@ -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
--
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fix random memory corruption during suspend-to-RAM resume
2003-02-09 20:31 Fix random memory corruption during suspend-to-RAM resume Pavel Machek
@ 2003-02-10 17:36 ` Linus Torvalds
2003-02-11 11:16 ` Pavel Machek
0 siblings, 1 reply; 5+ messages in thread
From: Linus Torvalds @ 2003-02-10 17:36 UTC (permalink / raw)
To: Pavel Machek; +Cc: kernel list, Rusty trivial patch monkey Russell
On Sun, 9 Feb 2003, Pavel Machek wrote:
>
> We really want to use wakeup_stack as 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fix random memory corruption during suspend-to-RAM resume
2003-02-10 17:36 ` Linus Torvalds
@ 2003-02-11 11:16 ` Pavel Machek
2003-02-11 20:23 ` Linus Torvalds
0 siblings, 1 reply; 5+ messages in thread
From: Pavel Machek @ 2003-02-11 11:16 UTC (permalink / raw)
To: Linus Torvalds; +Cc: kernel list, Rusty trivial patch monkey Russell
Hi!
> > We really want to use wakeup_stack as 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..)
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,0
Okay, 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
--
Casualities in World Trade Center: ~3k dead inside the building,
cryptography in U.S.A. and free speech in Czech Republic.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fix random memory corruption during suspend-to-RAM resume
2003-02-11 11:16 ` Pavel Machek
@ 2003-02-11 20:23 ` Linus Torvalds
2003-02-12 14:31 ` Pavel Machek
0 siblings, 1 reply; 5+ messages in thread
From: Linus Torvalds @ 2003-02-11 20:23 UTC (permalink / raw)
To: Pavel Machek; +Cc: kernel list, Rusty trivial patch monkey Russell
On Tue, 11 Feb 2003, Pavel Machek wrote:
> >
> > 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..)
>
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fix random memory corruption during suspend-to-RAM resume
2003-02-11 20:23 ` Linus Torvalds
@ 2003-02-12 14:31 ` Pavel Machek
0 siblings, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2003-02-12 14:31 UTC (permalink / raw)
To: Linus Torvalds; +Cc: kernel list, Rusty trivial patch monkey Russell
Hi!
> > > 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..)
> >
> > 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.
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
--
Casualities in World Trade Center: ~3k dead inside the building,
cryptography in U.S.A. and free speech in Czech Republic.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-02-12 14:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-09 20:31 Fix random memory corruption during suspend-to-RAM resume Pavel Machek
2003-02-10 17:36 ` Linus Torvalds
2003-02-11 11:16 ` Pavel Machek
2003-02-11 20:23 ` Linus Torvalds
2003-02-12 14:31 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).