From: jmerkey@wolfmountaingroup.com
To: linux-kernel@vger.kernel.org
Subject: [PATCH 2.6.27-rc3 25/28] mdb: add a notify_die handler to panic.c
Date: Fri, 15 Aug 2008 21:41:47 -0600 [thread overview]
Message-ID: <200808160341.m7G3fl4Y022575@wolfmountaingroup.com> (raw)
add a notify_die handler to hook the panic entry point prior to
Linux "execve"-ing another kernel for crash analysis.
Signed-off-by: Jeffrey Vernon Merkey (jmerkey@wolfmountaingroup.com)
--- a/kernel/panic.c 2008-08-15 21:26:27.000000000 -0600
+++ b/kernel/panic.c 2008-08-15 15:41:57.000000000 -0600
@@ -21,6 +21,8 @@
#include <linux/debug_locks.h>
#include <linux/random.h>
#include <linux/kallsyms.h>
+#include <linux/kdebug.h>
+
int panic_on_oops;
int tainted;
@@ -82,6 +84,13 @@
printk(KERN_EMERG "Kernel panic - not syncing: %s\n",buf);
bust_spinlocks(0);
+ /* call the notify_die handler for any resident debuggers which
+ * may be active and pass the message string. On a software
+ * fault return at least some sort of regs for a remote debugger
+ * to look at.
+ */
+ notify_die(DIE_PANIC, buf, get_irq_regs(), 0, 0, 0);
+
/*
* If we have crashed and we have a crash kernel loaded let it handle
* everything else.
reply other threads:[~2008-08-16 4:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200808160341.m7G3fl4Y022575@wolfmountaingroup.com \
--to=jmerkey@wolfmountaingroup.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox