diff options
author | Jan Beulich <jbeulich@novell.com> | 2006-06-26 07:57:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 13:48:17 -0400 |
commit | b538ed278b80641ee6d7b75497d5e14de1bb1137 (patch) | |
tree | fe508a2f950ec08c832474a253f41b188ceece75 /arch/x86_64/kernel/entry.S | |
parent | 4552d5dc08b79868829b4be8951b29b07284753f (diff) |
[PATCH] x86_64: reliable stack trace support (x86-64)
These are the x86_64-specific pieces to enable reliable stack traces. The
only restriction with this is that it currently cannot unwind across the
interrupt->normal stack boundary, as that transition is lacking proper
annotation.
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/x86_64/kernel/entry.S')
-rw-r--r-- | arch/x86_64/kernel/entry.S | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index 9999d703b6c4..6c68beec51b3 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S | |||
@@ -1089,3 +1089,36 @@ ENTRY(call_softirq) | |||
1089 | ret | 1089 | ret |
1090 | CFI_ENDPROC | 1090 | CFI_ENDPROC |
1091 | ENDPROC(call_softirq) | 1091 | ENDPROC(call_softirq) |
1092 | |||
1093 | #ifdef CONFIG_STACK_UNWIND | ||
1094 | ENTRY(arch_unwind_init_running) | ||
1095 | CFI_STARTPROC | ||
1096 | movq %r15, R15(%rdi) | ||
1097 | movq %r14, R14(%rdi) | ||
1098 | xchgq %rsi, %rdx | ||
1099 | movq %r13, R13(%rdi) | ||
1100 | movq %r12, R12(%rdi) | ||
1101 | xorl %eax, %eax | ||
1102 | movq %rbp, RBP(%rdi) | ||
1103 | movq %rbx, RBX(%rdi) | ||
1104 | movq (%rsp), %rcx | ||
1105 | movq %rax, R11(%rdi) | ||
1106 | movq %rax, R10(%rdi) | ||
1107 | movq %rax, R9(%rdi) | ||
1108 | movq %rax, R8(%rdi) | ||
1109 | movq %rax, RAX(%rdi) | ||
1110 | movq %rax, RCX(%rdi) | ||
1111 | movq %rax, RDX(%rdi) | ||
1112 | movq %rax, RSI(%rdi) | ||
1113 | movq %rax, RDI(%rdi) | ||
1114 | movq %rax, ORIG_RAX(%rdi) | ||
1115 | movq %rcx, RIP(%rdi) | ||
1116 | leaq 8(%rsp), %rcx | ||
1117 | movq $__KERNEL_CS, CS(%rdi) | ||
1118 | movq %rax, EFLAGS(%rdi) | ||
1119 | movq %rcx, RSP(%rdi) | ||
1120 | movq $__KERNEL_DS, SS(%rdi) | ||
1121 | jmpq *%rdx | ||
1122 | CFI_ENDPROC | ||
1123 | ENDPROC(arch_unwind_init_running) | ||
1124 | #endif | ||