diff options
author | Jan Beulich <jbeulich@novell.com> | 2006-06-26 07:57:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 13:48:17 -0400 |
commit | 176a2718f408ce92788b29127050b04dfd6e4f68 (patch) | |
tree | bb637b13098f821551d07d3a13d140a908e7bc04 /arch/i386/kernel/entry.S | |
parent | dffead4e421e289c8434351400d24fd35723e874 (diff) |
[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.S | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index cfc683f153b9..e802f3cac7e3 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S | |||
@@ -663,6 +663,35 @@ ENTRY(spurious_interrupt_bug) | |||
663 | pushl $do_spurious_interrupt_bug | 663 | pushl $do_spurious_interrupt_bug |
664 | jmp error_code | 664 | jmp error_code |
665 | 665 | ||
666 | #ifdef CONFIG_STACK_UNWIND | ||
667 | ENTRY(arch_unwind_init_running) | ||
668 | movl 4(%esp), %edx | ||
669 | movl (%esp), %ecx | ||
670 | leal 4(%esp), %eax | ||
671 | movl %ebx, EBX(%edx) | ||
672 | xorl %ebx, %ebx | ||
673 | movl %ebx, ECX(%edx) | ||
674 | movl %ebx, EDX(%edx) | ||
675 | movl %esi, ESI(%edx) | ||
676 | movl %edi, EDI(%edx) | ||
677 | movl %ebp, EBP(%edx) | ||
678 | movl %ebx, EAX(%edx) | ||
679 | movl $__USER_DS, DS(%edx) | ||
680 | movl $__USER_DS, ES(%edx) | ||
681 | movl %ebx, ORIG_EAX(%edx) | ||
682 | movl %ecx, EIP(%edx) | ||
683 | movl 12(%esp), %ecx | ||
684 | movl $__KERNEL_CS, CS(%edx) | ||
685 | movl %ebx, EFLAGS(%edx) | ||
686 | movl %eax, OLDESP(%edx) | ||
687 | movl 8(%esp), %eax | ||
688 | movl %ecx, 8(%esp) | ||
689 | movl EBX(%edx), %ebx | ||
690 | movl $__KERNEL_DS, OLDSS(%edx) | ||
691 | jmpl *%eax | ||
692 | ENDPROC(arch_unwind_init_running) | ||
693 | #endif | ||
694 | |||
666 | .section .rodata,"a" | 695 | .section .rodata,"a" |
667 | #include "syscall_table.S" | 696 | #include "syscall_table.S" |
668 | 697 | ||