Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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>

authored by

Vivek Goyal and committed by
Linus Torvalds
8bcc5280 87cb23a4

+5
+5
arch/x86_64/kernel/traps.c
··· 30 30 #include <linux/moduleparam.h> 31 31 #include <linux/nmi.h> 32 32 #include <linux/kprobes.h> 33 + #include <linux/kexec.h> 33 34 34 35 #include <asm/system.h> 35 36 #include <asm/uaccess.h> ··· 434 433 printk(KERN_ALERT "RIP "); 435 434 printk_address(regs->rip); 436 435 printk(" RSP <%016lx>\n", regs->rsp); 436 + if (kexec_should_crash(current)) 437 + crash_kexec(regs); 437 438 } 438 439 439 440 void die(const char * str, struct pt_regs * regs, long err) ··· 458 455 */ 459 456 printk(str, safe_smp_processor_id()); 460 457 show_registers(regs); 458 + if (kexec_should_crash(current)) 459 + crash_kexec(regs); 461 460 if (panic_on_timeout || panic_on_oops) 462 461 panic("nmi watchdog"); 463 462 printk("console shuts up ...\n");