lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 8 Aug 2008 07:19:02 -0600 (MDT)
From:	jmerkey@...fmountaingroup.com
To:	"Andi Kleen" <andi@...stfloor.org>
Cc:	"Cliff Wickman" <cpw@....com>, "Andi Kleen" <andi@...stfloor.org>,
	"Vivek Goyal" <vgoyal@...hat.com>, "Keith Owens" <kaos@....com.au>,
	"Jay Lan" <jlan@....com>,
	"Christoph Lameter" <cl@...ux-foundation.org>,
	"Stefan Richter" <stefanr@...6.in-berlin.de>,
	"Nick Piggin" <nickpiggin@...oo.com.au>,
	jmerkey@...fmountaingroup.com,
	"Geert Uytterhoeven" <geert@...ux-m68k.org>,
	"Josh Boyer" <jwboyer@...il.com>, linux-kernel@...r.kernel.org,
	"Takenori Nagano" <t-nagano@...jp.nec.com>,
	"Bernhard Walle" <bwalle@...e.de>
Subject: Re: [ANNOUNCE] Merkey's Kernel Debugger

>> In a partitioned system [I work for SGI, so I'm talking about an Altix],
>> there is memory sharing among multiple single-system images. And if
>> one of those partitions were to panic the other partitions need to
>> be informed that they cannot address the panic'd partition's memory.
>> (Once that partition is rebooted any such access will cause an MCA
>> in the accessor.)
>
> There are already existing shutdown hooks. Aren't they good enough
> for that?
>
> I would feel uneasy about having arbitary drivers hook into panic().
> While I'm sure your code is great there is unfortunately a lot
> of crappy driver code around.
>
> -Andi
>

I hooked panic last night and inserted a notify_die hook -- there is even
a state defined for it already -- DIE_PANIC.  The rest of the code should
be ok.  My only question was where to harvest the regs variable since
panic is not a real exception.

Here's a first stab.  You also must add #include <linux/kdebug.h> to the
top of panic as well.

diff -Naur linux-2.6.27/kernel/panic.c linux-2.6.27-mdb/kernel/panic.c
--- linux-2.6.27/kernel/panic.c	2008-08-07 15:32:29.000000000 -0600
+++ linux-2.6.27-mdb/kernel/panic.c	2008-08-07 15:29:09.000000000 -0600
@@ -82,6 +82,12 @@
 	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.


Jeff


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ