Commit 6574ffd7 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[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: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7fd67843
...@@ -213,6 +213,11 @@ ENTRY(early_idt_handler) ...@@ -213,6 +213,11 @@ ENTRY(early_idt_handler)
cmpl $2,early_recursion_flag(%rip) cmpl $2,early_recursion_flag(%rip)
jz 1f jz 1f
call dump_stack call dump_stack
#ifdef CONFIG_KALLSYMS
leaq early_idt_ripmsg(%rip),%rdi
movq 8(%rsp),%rsi # get rip again
call __print_symbol
#endif
1: hlt 1: hlt
jmp 1b jmp 1b
early_recursion_flag: early_recursion_flag:
...@@ -220,6 +225,8 @@ early_recursion_flag: ...@@ -220,6 +225,8 @@ early_recursion_flag:
early_idt_msg: early_idt_msg:
.asciz "PANIC: early exception rip %lx error %lx cr2 %lx\n" .asciz "PANIC: early exception rip %lx error %lx cr2 %lx\n"
early_idt_ripmsg:
.asciz "RIP %s\n"
.code32 .code32
ENTRY(no_long_mode) ENTRY(no_long_mode)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment