2006-10-21 16:51:47

by Andi Kleen

[permalink] [raw]
Subject: [PATCH] [11/19] i386: Fix fake return address


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


2006-10-21 18:12:50

by Jeremy Fitzhardinge

[permalink] [raw]
Subject: Re: [PATCH] [11/19] i386: Fix fake return address

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

2006-10-21 18:15:06

by Andi Kleen

[permalink] [raw]
Subject: Re: [PATCH] [11/19] i386: Fix fake return address


> 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

2006-10-21 18:17:43

by Andreas Schwab

[permalink] [raw]
Subject: Re: [PATCH] [11/19] i386: Fix fake return address

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."