diff options
author | Vivek Goyal <vgoyal@in.ibm.com> | 2006-04-18 06:35:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-18 13:39:19 -0400 |
commit | 8bcc5280e68878d2b989c91d98305109e391c86a (patch) | |
tree | f6a804b0d1f080af45ebdcf2552a33840f059d85 /arch/x86_64 | |
parent | 87cb23a48c208f31ab87c7a2aad37dbb355575f3 (diff) |
[PATCH] x86_64: x86_64 add crashdump trigger points
o Start booting into the capture kernel after an Oops if system is in a
unrecoverable state. System will boot into the capture kernel, if one is
pre-loaded by the user, and capture the kernel core dump.
o One of the following conditions should be true to trigger the booting of
capture kernel.
- panic_on_oops is set.
- pid of current thread is 0
- pid of current thread is 1
- Oops happened inside interrupt context.
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64')
-rw-r--r-- | arch/x86_64/kernel/traps.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 6bda322d3caf..2700b1375c1f 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/moduleparam.h> | 30 | #include <linux/moduleparam.h> |
31 | #include <linux/nmi.h> | 31 | #include <linux/nmi.h> |
32 | #include <linux/kprobes.h> | 32 | #include <linux/kprobes.h> |
33 | #include <linux/kexec.h> | ||
33 | 34 | ||
34 | #include <asm/system.h> | 35 | #include <asm/system.h> |
35 | #include <asm/uaccess.h> | 36 | #include <asm/uaccess.h> |
@@ -433,6 +434,8 @@ void __kprobes __die(const char * str, struct pt_regs * regs, long err) | |||
433 | printk(KERN_ALERT "RIP "); | 434 | printk(KERN_ALERT "RIP "); |
434 | printk_address(regs->rip); | 435 | printk_address(regs->rip); |
435 | printk(" RSP <%016lx>\n", regs->rsp); | 436 | printk(" RSP <%016lx>\n", regs->rsp); |
437 | if (kexec_should_crash(current)) | ||
438 | crash_kexec(regs); | ||
436 | } | 439 | } |
437 | 440 | ||
438 | void die(const char * str, struct pt_regs * regs, long err) | 441 | void die(const char * str, struct pt_regs * regs, long err) |
@@ -455,6 +458,8 @@ void __kprobes die_nmi(char *str, struct pt_regs *regs) | |||
455 | */ | 458 | */ |
456 | printk(str, safe_smp_processor_id()); | 459 | printk(str, safe_smp_processor_id()); |
457 | show_registers(regs); | 460 | show_registers(regs); |
461 | if (kexec_should_crash(current)) | ||
462 | crash_kexec(regs); | ||
458 | if (panic_on_timeout || panic_on_oops) | 463 | if (panic_on_timeout || panic_on_oops) |
459 | panic("nmi watchdog"); | 464 | panic("nmi watchdog"); |
460 | printk("console shuts up ...\n"); | 465 | printk("console shuts up ...\n"); |