From: Jeremy Fitzhardinge <[email protected]>
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]>
Signed-off-by: Andi Kleen <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Andrew Morton <[email protected]>
---
arch/i386/kernel/head.S | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: linux/arch/i386/kernel/head.S
===================================================================
--- linux.orig/arch/i386/kernel/head.S
+++ linux/arch/i386/kernel/head.S
@@ -317,7 +317,7 @@ is386: movl $2,%ecx # set MP
movl %eax,%gs
lldt %ax
cld # gcc2 wants the direction flag cleared at all times
- pushl %eax # fake return address
+ pushl $0 # fake return address for unwinder
#ifdef CONFIG_SMP
movb ready, %cl
movb $1, ready
Andi Kleen wrote:
> From: Jeremy Fitzhardinge <[email protected]>
> 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]>
> Signed-off-by: Andi Kleen <[email protected]>
> Cc: Andi Kleen <[email protected]>
> Cc: Andrew Morton <[email protected]>
>
> ---
> arch/i386/kernel/head.S | 2 +-
> 1 files changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux/arch/i386/kernel/head.S
> ===================================================================
> --- linux.orig/arch/i386/kernel/head.S
> +++ linux/arch/i386/kernel/head.S
> @@ -317,7 +317,7 @@ is386: movl $2,%ecx # set MP
> movl %eax,%gs
> lldt %ax
> cld # gcc2 wants the direction flag cleared at all times
> - pushl %eax # fake return address
> + pushl $0 # fake return address for unwinder
> #ifdef CONFIG_SMP
Yep, that's better than my patch, but the comment is out of date.
J
> Yep, that's better than my patch, but the comment is out of date.
Sorry, i changed it while doing a merge (original patch rejected
somewhere) but forgot to adapt the description
-Andi
Andi Kleen <[email protected]> writes:
> From: Jeremy Fitzhardinge <[email protected]>
> The fake return address was being set to __KERNEL_PDA, rather than 0.
> Push it earlier while %eax still equals 0.
There is a slight discrepancy between the description and what is really
implemented by the patch.
Andreas.
--
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux Products GmbH, Maxfeldstra?e 5, 90409 N?rnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."