summaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/entry.S
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2006-06-26 13:57:41 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 10:48:17 -0700
commit176a2718f408ce92788b29127050b04dfd6e4f68 (patch)
treebb637b13098f821551d07d3a13d140a908e7bc04 /arch/i386/kernel/entry.S
parentdffead4e421e289c8434351400d24fd35723e874 (diff)
downloadop-kernel-dev-176a2718f408ce92788b29127050b04dfd6e4f68.zip
op-kernel-dev-176a2718f408ce92788b29127050b04dfd6e4f68.tar.gz
[PATCH] i386: reliable stack trace support (i386)
These are the i386-specific pieces to enable reliable stack traces. This is going to be even more useful once CFI annotations get added to he assembly code, namely to entry.S. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/kernel/entry.S')
-rw-r--r--arch/i386/kernel/entry.S29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
index cfc683f..e802f3c 100644
--- a/arch/i386/kernel/entry.S
+++ b/arch/i386/kernel/entry.S
@@ -663,6 +663,35 @@ ENTRY(spurious_interrupt_bug)
pushl $do_spurious_interrupt_bug
jmp error_code
+#ifdef CONFIG_STACK_UNWIND
+ENTRY(arch_unwind_init_running)
+ movl 4(%esp), %edx
+ movl (%esp), %ecx
+ leal 4(%esp), %eax
+ movl %ebx, EBX(%edx)
+ xorl %ebx, %ebx
+ movl %ebx, ECX(%edx)
+ movl %ebx, EDX(%edx)
+ movl %esi, ESI(%edx)
+ movl %edi, EDI(%edx)
+ movl %ebp, EBP(%edx)
+ movl %ebx, EAX(%edx)
+ movl $__USER_DS, DS(%edx)
+ movl $__USER_DS, ES(%edx)
+ movl %ebx, ORIG_EAX(%edx)
+ movl %ecx, EIP(%edx)
+ movl 12(%esp), %ecx
+ movl $__KERNEL_CS, CS(%edx)
+ movl %ebx, EFLAGS(%edx)
+ movl %eax, OLDESP(%edx)
+ movl 8(%esp), %eax
+ movl %ecx, 8(%esp)
+ movl EBX(%edx), %ebx
+ movl $__KERNEL_DS, OLDSS(%edx)
+ jmpl *%eax
+ENDPROC(arch_unwind_init_running)
+#endif
+
.section .rodata,"a"
#include "syscall_table.S"
OpenPOWER on IntegriCloud