Hello.
Linus Torvalds wrote:
OK, so how do you feel about the attachedThat's a good argument, and may be the strongest reason for _not_ doing the speculation. However, I don't think it really can happen anywhere else.2. How can one be sure there are no more of the like places where the stack is left empty?
patch? I understand that from some point
of view it may look like a hack, but at
the same time it:
1. Allows to preserve the valueable optimization
2. Works for NMIs
3. Doesn't care whether or not there are more
of the like instances where the stack is left
empty.
4. Seems to work for me without the crashes:)
--- linux/arch/i386/kernel/process.c.old 2005-03-20 14:12:18.000000000 +0300 +++ linux/arch/i386/kernel/process.c 2005-04-10 16:54:39.000000000 +0400 @@ -394,7 +394,7 @@ childregs->esp = esp; p->thread.esp = (unsigned long) childregs; - p->thread.esp0 = (unsigned long) (childregs+1); + p->thread.esp0 = (unsigned long) (childregs+1) - 8; p->thread.eip = (unsigned long) ret_from_fork;

