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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 19 Mar 2012 20:00:42 -0500
From:	Jason Wessel <jason.wessel@...driver.com>
To:	Jan Kiszka <jan.kiszka@...mens.com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"kgdb-bugreport@...ts.sourceforge.net" 
	<kgdb-bugreport@...ts.sourceforge.net>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH 4/4] kgdb: x86: Detach gdb if machine shuts down or reboots

On 03/19/2012 08:49 AM, Jan Kiszka wrote:
> 
> An arch-independent hook has its advantages, no question. Maybe we
> should just start this way and then evolved on top as needed.
> 

Sounds good to me.  I added the reboot notifier patch into the merge queue for kgdb/kdb.

> I was wondering why those other archs do not use the notifier. Maybe one
> motivation is to avoid that too much code is excluded from the debugger
> by detaching too early. Could possibly be addressed by making
> detach-on-reboot runtime configurable.

There really isn't a whole lot of code between reboot hook invoked from kernel_restart_prepare(), and the place where the reset is invoked.  Specifically it looked like:

        usermodehelper_disable();
        device_shutdown();
        syscore_shutdown();
        machine_restart(cmd);

Attached is the patch you asked for the conditional behavior with respect to the reboot hook.  This also implements the ability to stop on a reboot that is not a panic().

Cheers,
Jason.

View attachment "0001-kgdb-debug_core-add-the-ability-to-control-the-reboo.patch" of type "text/x-diff" (3495 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ