Fix fake return address
PATCH 1/1 Fix fake return address
The fake return address was being set to __KERNEL_PDA, rather than 0. Push it earlier while %eax still equals 0.
Signed-off-by Jeremy Fitzhardinge <[email protected]>
Cc Andi Kleen <[email protected]>
Cc Andrew Morton <[email protected]>
arch/i386/kernel/head.S +0 -0
@@ -316,12 +316,12 @@ 1: movl $(__KERNEL_DS),%eax # reload all
xorl %eax,%eax # Clear FS and LDT
movl %eax,%fs
lldt %ax
+ pushl %eax # fake return address
movl $(__KERNEL_PDA),%eax mov %eax,%gs cld # gcc2 wants the direction flag cleared at all times
- pushl %eax # fake return address
#ifdef CONFIG_SMP
movb ready, %cl
movb $1, ready
Quoted 2 lines · Jeremy Fitzhardinge
The fake return address was being set to
__KERNEL_PDA, rather than 0. Push it earlier while %eax still equals 0.
Oops. That might explain some of the unwind problems. Thanks.
-Andi
Quoted 26 lines
Signed-off-by Jeremy Fitzhardinge <[email protected]>Cc Andi Kleen <[email protected]>Cc Andrew Morton <[email protected]>diff -r
b8e58159855carch/i386/kernel/head.Sarch/i386/kernel/head.S +1
-1@@ -316,12 +316,12 @@ 1: movl $(__KERNEL_DS),%eax # reload all xorl %eax,%eax # Clear FS and LDT movl %eax,%fs lldt %ax + pushl %eax # fake return address movl $(__KERNEL_PDA),%eax mov %eax,%gs cld # gcc2 wants the direction flag cleared at all times - pushl %eax # fake return address #ifdef CONFIG_SMP movb ready, %clmovb $1, ready