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]
Message-ID: <CA+RfmHax1j3oFUWzNNqBmQqkZA9xGT0u0+azc0PAqNuzhJqSuA@mail.gmail.com>
Date:	Tue, 6 Jan 2015 10:31:11 +0530
From:	Kiran Raparthy <kiran.kumar@...aro.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Colin Cross <ccross@...roid.com>,
	Jason Wessel <jason.wessel@...driver.com>,
	kgdb-bugreport@...ts.sourceforge.net,
	Android Kernel Team <kernel-team@...roid.com>,
	John Stultz <john.stultz@...aro.org>,
	Sumit Semwal <sumit.semwal@...aro.org>
Subject: Re: [RFC v4] debug: prevent entering debug mode on panic/exception.

Hi Andrew,

On 6 January 2015 at 05:44, Andrew Morton <akpm@...ux-foundation.org> wrote:
> On Tue, 23 Dec 2014 18:08:29 +0530 Kiran Raparthy <kiran.kumar@...aro.org> wrote:
>
>> From: Colin Cross <ccross@...roid.com>
>>
>> debug: prevent entering debug mode on panic/exception.
>>
>> On non-developer devices, kgdb prevents the device from rebooting
>> after a panic.
>>
>> Incase of panics and exceptions, to allow the device to reboot, prevent
>> entering debug mode to avoid getting stuck waiting for the user to interact
>> with debugger.
>>
>> To avoid entering the debugger on panic/exception without any extra
>> configuration, panic_timeout is being used which can be set via
>> /proc/sys/kernel/panic at run time and CONFIG_PANIC_TIMEOUT sets the default
>> value.
>>
>> ...
>>
>
> hm.  Why overload the meaning of panic_timeout in this fashion?  If
> someone is using kgdb and has panic_timeout set, they'll get quiet a
> surprise.
We are just using already exported kernel symbol to avoid extra configuration.
So we have chosen panic_timeout to allow kgdb to honor CONFIG_PANIC_TIMEOUT.
I can modify the commit text if you feel the above commit text
overloading the meaning of panic_timeout.

To give you a better idea about why we have used panic_timeout,
sharing Daniel's previous review comment:

"It ought to be possible for kgdb/kdb to honour CONFIG_PANIC_TIMEOUT by
tracking how long it takes for the user to attach a debugger (or to run
the first kdb command after the panic). As it happens the timeout value
is already an exported kernel symbol so all the info is there for us to
use.Doing so would save us imposing further configuration burden on the user"

>
> Would it be cleaner/clearer to add some new standalone control for
> this?  One which is only present if CONFIG_KGDB.

Original Android patch uses separate configuration but since we can
achieve the same with
already existing kernel symbol,we have used panic_timeout.
>
>
> We appear to have forgotten to document panic_timeout.  Sigh.
Regards,
Kiran
--
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