Commit 8bcc5280 authored by Vivek Goyal's avatar Vivek Goyal Committed by Linus Torvalds
Browse files

[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: default avatarVivek Goyal <>
Signed-off-by: default avatarAndi Kleen <>
Signed-off-by: default avatarLinus Torvalds <>
parent 87cb23a4
......@@ -30,6 +30,7 @@
#include <linux/moduleparam.h>
#include <linux/nmi.h>
#include <linux/kprobes.h>
#include <linux/kexec.h>
#include <asm/system.h>
#include <asm/uaccess.h>
......@@ -433,6 +434,8 @@ void __kprobes __die(const char * str, struct pt_regs * regs, long err)
printk(KERN_ALERT "RIP ");
printk(" RSP <%016lx>\n", regs->rsp);
if (kexec_should_crash(current))
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)
printk(str, safe_smp_processor_id());
if (kexec_should_crash(current))
if (panic_on_timeout || panic_on_oops)
panic("nmi watchdog");
printk("console shuts up ...\n");
Supports Markdown
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