diff options
author | Andi Kleen <ak@suse.de> | 2006-02-16 17:42:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-17 11:00:40 -0500 |
commit | 6574ffd74b03e35026f428a2c820e6ddf45d426c (patch) | |
tree | 5e02a440a8499d0ac8e41a9dd7d4e74dbbe1ea19 /arch/x86_64/kernel/head.S | |
parent | 7fd67843b96f90f59c9a244a1bc25137978a3ff9 (diff) |
[PATCH] x86_64: Resolve the RIP of an early exception using kallsyms
But do it after everything else to risk less from recursive
crashes.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/head.S')
-rw-r--r-- | arch/x86_64/kernel/head.S | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S index 692c737fedd..02fc7fa0ea2 100644 --- a/arch/x86_64/kernel/head.S +++ b/arch/x86_64/kernel/head.S | |||
@@ -213,6 +213,11 @@ ENTRY(early_idt_handler) | |||
213 | cmpl $2,early_recursion_flag(%rip) | 213 | cmpl $2,early_recursion_flag(%rip) |
214 | jz 1f | 214 | jz 1f |
215 | call dump_stack | 215 | call dump_stack |
216 | #ifdef CONFIG_KALLSYMS | ||
217 | leaq early_idt_ripmsg(%rip),%rdi | ||
218 | movq 8(%rsp),%rsi # get rip again | ||
219 | call __print_symbol | ||
220 | #endif | ||
216 | 1: hlt | 221 | 1: hlt |
217 | jmp 1b | 222 | jmp 1b |
218 | early_recursion_flag: | 223 | early_recursion_flag: |
@@ -220,6 +225,8 @@ early_recursion_flag: | |||
220 | 225 | ||
221 | early_idt_msg: | 226 | early_idt_msg: |
222 | .asciz "PANIC: early exception rip %lx error %lx cr2 %lx\n" | 227 | .asciz "PANIC: early exception rip %lx error %lx cr2 %lx\n" |
228 | early_idt_ripmsg: | ||
229 | .asciz "RIP %s\n" | ||
223 | 230 | ||
224 | .code32 | 231 | .code32 |
225 | ENTRY(no_long_mode) | 232 | ENTRY(no_long_mode) |