All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Feng Tang <feng.tang@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org, Kees Cook <keescook@chromium.org>,
	Borislav Petkov <bp@suse.de>
Subject: Re: [PATCH 1/2] printk: Add an option to flush all messages on panic
Date: Tue, 9 Apr 2019 15:41:09 +0200	[thread overview]
Message-ID: <20190409134109.ounidzwphouqr3w2@pathway.suse.cz> (raw)
In-Reply-To: <20190402022900.GA2219@jagdpanzerIV>

On Tue 2019-04-02 11:29:00, Sergey Senozhatsky wrote:
> On (04/02/19 10:28), Feng Tang wrote:
> > > So my first thought was - let's not add a `bool flag', but instead add
> > > an `enum' with clear flag names, e.g. DUMP_ALL/DUMP_PENDING, etc. Something
> > > similar to what ftrace_dump(DUMP_ALL) does. And we already have panic_print
> > > bit-mask and panic_print_sys_info(), which controls what we print when in
> > > panic. So we can move console_flush_on_panic() to panic_print_sys_info()
> > > and handle different types of console_flush_on_panic() there:
> > > 
> > > ---
> > > 
> > > diff --git a/kernel/panic.c b/kernel/panic.c
> > > index 0ae0d7332f12..e142faaebbcd 100644
> > > --- a/kernel/panic.c
> > > +++ b/kernel/panic.c
> > > @@ -134,6 +134,11 @@ EXPORT_SYMBOL(nmi_panic);
> > >  
> > >  static void panic_print_sys_info(void)
> > >  {
> > > +	if (panic_print & PANIC_PRINT_REPLAY_LOGBUF)
> > > +		console_flush_on_panic(DUMP_ALL);
> > > +	else
> > > +		console_flush_on_panic(DUMP_PENDING);
> > > +
> > >  	if (panic_print & PANIC_PRINT_TASK_INFO)
> > >  		show_state();
> > >  
> > > @@ -277,7 +282,6 @@ void panic(const char *fmt, ...)
> > >  	 * panic() is not being callled from OOPS.
> > >  	 */
> > >  	debug_locks_off();
> > > -	console_flush_on_panic();
> > >  
> > >  	panic_print_sys_info();
> > >  
> > 
> > I guess this is what my 2/2 patch exactly does :)
> 
> Oh, indeed... I didn't check 2/2.

I suggest to merge the two patches into one. It will
still be rather small and easier to review.

Best Regards,
Petr

  reply	other threads:[~2019-04-09 13:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01 10:48 [PATCH 1/2] printk: Add an option to flush all messages on panic Feng Tang
2019-04-01 10:48 ` [PATCH 2/2] panic: Enable to print out all printk msg in buffer Feng Tang
2019-04-09 14:14   ` Petr Mladek
2019-04-10  1:59     ` Sergey Senozhatsky
2019-04-10  8:02       ` Petr Mladek
2019-04-10  8:16         ` Sergey Senozhatsky
2019-04-10 10:12     ` Feng Tang
2019-04-01 11:50 ` [PATCH 1/2] printk: Add an option to flush all messages on panic Mukesh Ojha
2019-04-02  2:47   ` Feng Tang
2019-04-02  2:14 ` Sergey Senozhatsky
2019-04-02  2:28   ` Feng Tang
2019-04-02  2:29     ` Sergey Senozhatsky
2019-04-09 13:41       ` Petr Mladek [this message]
2019-04-10  1:47         ` Sergey Senozhatsky
2019-04-10  2:21           ` Feng Tang

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=20190409134109.ounidzwphouqr3w2@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@suse.de \
    --cc=feng.tang@intel.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.