Re: [PATCH V4] kernel, add bug_on_warn

2014-10-28 Thread Prarit Bhargava
On 10/28/2014 08:56 AM, Andi Kleen wrote: >>> If you have a command line option to execute kdb commands you still >>> would only have a command line option, just a slightly longer one. >>> >>> kdb="on, bp warn_slowpath_common sr c, go" >> >> KDB is not on all kernels. This would require me to g

Re: [PATCH V4] kernel, add bug_on_warn

2014-10-28 Thread Andi Kleen
> > kdb="on, bp warn_slowpath_common sr c, go" > > So does it already work or proposal is to make something like this work > with kdb? It does not work today, the missing pieces are: - extending kdb= to execute a list of kdb commands - extending bp to define a list of commands to execute > >

Re: [PATCH V4] kernel, add bug_on_warn

2014-10-28 Thread Vivek Goyal
On Tue, Oct 28, 2014 at 05:44:25AM -0700, Andi Kleen wrote: > > > I suppose ... but that would mean I would have to explain to an end user > > > the > > > elaborate process of enabling kdb, inserting a break point, etc. The > > > whole > > > purpose of this is to let an end user panic on WARN()

Re: [PATCH V4] kernel, add bug_on_warn

2014-10-28 Thread Andi Kleen
> > If you have a command line option to execute kdb commands you still > > would only have a command line option, just a slightly longer one. > > > > kdb="on, bp warn_slowpath_common sr c, go" > > KDB is not on all kernels. This would require me to go to great lengths to Repeating incorrect s

Re: [PATCH V4] kernel, add bug_on_warn

2014-10-28 Thread Prarit Bhargava
On 10/28/2014 08:44 AM, Andi Kleen wrote: >>> I suppose ... but that would mean I would have to explain to an end user the >>> elaborate process of enabling kdb, inserting a break point, etc. The whole >>> purpose of this is to let an end user panic on WARN() easily. >>> >>> Asking an end user t

Re: [PATCH V4] kernel, add bug_on_warn

2014-10-28 Thread Andi Kleen
> > I suppose ... but that would mean I would have to explain to an end user the > > elaborate process of enabling kdb, inserting a break point, etc. The whole > > purpose of this is to let an end user panic on WARN() easily. > > > > Asking an end user to enable kdb is magnitudes worse than askin

Re: [PATCH V4] kernel, add bug_on_warn

2014-10-28 Thread Vivek Goyal
On Tue, Oct 28, 2014 at 08:22:16AM -0400, Prarit Bhargava wrote: > > > On 10/28/2014 08:16 AM, Andi Kleen wrote: > > On Fri, Oct 24, 2014 at 08:53:27AM -0400, Prarit Bhargava wrote: > >> There have been several times where I have had to rebuild a kernel to > >> cause a panic when hitting a WARN()

Re: [PATCH V4] kernel, add bug_on_warn

2014-10-28 Thread Prarit Bhargava
On 10/28/2014 08:16 AM, Andi Kleen wrote: > On Fri, Oct 24, 2014 at 08:53:27AM -0400, Prarit Bhargava wrote: >> There have been several times where I have had to rebuild a kernel to >> cause a panic when hitting a WARN() in the code in order to get a crash >> dump from a system. Sometimes this i

Re: [PATCH V4] kernel, add bug_on_warn

2014-10-28 Thread Andi Kleen
On Fri, Oct 24, 2014 at 08:53:27AM -0400, Prarit Bhargava wrote: > There have been several times where I have had to rebuild a kernel to > cause a panic when hitting a WARN() in the code in order to get a crash > dump from a system. Sometimes this is easy to do, other times (such as > in the case

Re: Re: [PATCH V4] kernel, add bug_on_warn

2014-10-27 Thread Masami Hiramatsu
(2014/10/28 3:15), Prarit Bhargava wrote: > > > On 10/27/2014 02:05 PM, Jason Baron wrote: >> Hi Prarit, >> >> On 10/24/2014 08:53 AM, Prarit Bhargava wrote: >>> There have been several times where I have had to rebuild a kernel to >>> cause a panic when hitting a WARN() in the code in order to g

Re: [PATCH V4] kernel, add bug_on_warn

2014-10-27 Thread Dave Young
> > Seems reasonable-I'm wondering why you just don't call panic() in this > > case. The BUG() call at line '434' doesn't at anything since its just being > > called from panic.c. > > Hmm ... I didn't even think about that. > > > > > So something like 'panic_on_warn' would seem to be more approp

Re: [PATCH V4] kernel, add bug_on_warn

2014-10-27 Thread Yasuaki Ishimatsu
(2014/10/24 21:53), Prarit Bhargava wrote: > There have been several times where I have had to rebuild a kernel to > cause a panic when hitting a WARN() in the code in order to get a crash > dump from a system. Sometimes this is easy to do, other times (such as > in the case of a remote admin) it

Re: [PATCH V4] kernel, add bug_on_warn

2014-10-27 Thread Prarit Bhargava
On 10/27/2014 02:05 PM, Jason Baron wrote: > Hi Prarit, > > On 10/24/2014 08:53 AM, Prarit Bhargava wrote: >> There have been several times where I have had to rebuild a kernel to >> cause a panic when hitting a WARN() in the code in order to get a crash >> dump from a system. Sometimes this is

Re: [PATCH V4] kernel, add bug_on_warn

2014-10-27 Thread Jason Baron
Hi Prarit, On 10/24/2014 08:53 AM, Prarit Bhargava wrote: > There have been several times where I have had to rebuild a kernel to > cause a panic when hitting a WARN() in the code in order to get a crash > dump from a system. Sometimes this is easy to do, other times (such as > in the case of a r