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

Jan Beulich jbeulich at novell.com
Mon May 22 15:18:08 CEST 2006


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 at novell.com>

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





More information about the discuss mailing list