tree 369eccf7e24a263627977dd7a0986e779449c30d
parent f1290ec93e5da4a748ca4758a00b580283e06596
author Andi Kleen <[EMAIL PROTECTED]> Sun, 17 Apr 2005 05:25:00 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sun, 17 Apr 2005 05:25:00 -0700
[PATCH] x86_64: Dump stack and prevent recursion on early fault
Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
x86_64/kernel/head.S | 8 ++++++++
1 files changed, 8 insertions(+)
Index: arch/x86_64/kernel/head.S
===================================================================
--- 16cc70b78452643771161a15092228a8d3bab7ad/arch/x86_64/kernel/head.S
(mode:100644 sha1:b6d8725c1f611f174bb9de741514c3dd014f39d8)
+++ 369eccf7e24a263627977dd7a0986e779449c30d/arch/x86_64/kernel/head.S
(mode:100644 sha1:9bd2e7a4b81e196d89856871397d6300c2e4d2bb)
@@ -200,14 +200,22 @@
.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"
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html