[PATCH 4/6] reliable stack trace support (x86-64 syscalladjustment)

From: Jan Beulich
Date: Mon May 22 2006 - 09:16:41 EST


Adjust the CFA offset for 64- and 32-bit syscall entries so that the five
slots pre-subtracted from the stack pointer do not appear to reside outside
of the current frame.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: unwind-2.6.17-rc4/arch/x86_64/ia32/ia32entry.S
===================================================================
--- unwind-2.6.17-rc4.orig/arch/x86_64/ia32/ia32entry.S 2006-05-22 15:00:34.000000000 +0200
+++ unwind-2.6.17-rc4/arch/x86_64/ia32/ia32entry.S 2006-05-22 15:01:10.000000000 +0200
@@ -178,7 +178,7 @@ sysenter_tracesys:
*/
ENTRY(ia32_cstar_target)
CFI_STARTPROC32 simple
- CFI_DEF_CFA rsp,0
+ CFI_DEF_CFA rsp,PDA_STACKOFFSET
CFI_REGISTER rip,rcx
/*CFI_REGISTER rflags,r11*/
swapgs
Index: unwind-2.6.17-rc4/arch/x86_64/kernel/entry.S
===================================================================
--- unwind-2.6.17-rc4.orig/arch/x86_64/kernel/entry.S 2006-05-22 15:01:07.000000000 +0200
+++ unwind-2.6.17-rc4/arch/x86_64/kernel/entry.S 2006-05-22 15:01:10.000000000 +0200
@@ -188,7 +188,7 @@ rff_trace:

ENTRY(system_call)
CFI_STARTPROC simple
- CFI_DEF_CFA rsp,0
+ CFI_DEF_CFA rsp,PDA_STACKOFFSET
CFI_REGISTER rip,rcx
/*CFI_REGISTER rflags,r11*/
swapgs


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/