diff options
author | Andi Kleen <ak@suse.de> | 2005-04-17 00:25:00 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-17 00:25:00 +0200 |
commit | b957591fee753101f289615abab1c54ff7b1d29d (patch) | |
tree | 369eccf7e24a263627977dd7a0986e779449c30d /arch/x86_64/kernel/head.S | |
parent | [PATCH] x86_64: Use a common function to find code segment bases (diff) | |
download | linux-b957591fee753101f289615abab1c54ff7b1d29d.tar.xz linux-b957591fee753101f289615abab1c54ff7b1d29d.zip |
[PATCH] x86_64: Dump stack and prevent recursion on early fault
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to '')
-rw-r--r-- | arch/x86_64/kernel/head.S | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S index b6d8725c1f61..9bd2e7a4b81e 100644 --- a/arch/x86_64/kernel/head.S +++ b/arch/x86_64/kernel/head.S @@ -200,14 +200,22 @@ init_rsp: .quad init_thread_union+THREAD_SIZE-8 ENTRY(early_idt_handler) + cmpl $2,early_recursion_flag(%rip) + jz 1f + incl early_recursion_flag(%rip) xorl %eax,%eax movq 8(%rsp),%rsi # get rip movq (%rsp),%rdx movq %cr2,%rcx leaq early_idt_msg(%rip),%rdi call early_printk + cmpl $2,early_recursion_flag(%rip) + jz 1f + call dump_stack 1: hlt jmp 1b +early_recursion_flag: + .long 0 early_idt_msg: .asciz "PANIC: early exception rip %lx error %lx cr2 %lx\n" |