public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	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 2/2] panic: Enable to print out all printk msg in buffer
Date: Wed, 10 Apr 2019 17:16:10 +0900	[thread overview]
Message-ID: <20190410081610.GA25962@jagdpanzerIV> (raw)
In-Reply-To: <20190410080224.hmyzv2mqcjyceiw3@pathway.suse.cz>

On (04/10/19 10:02), Petr Mladek wrote:
> On Wed 2019-04-10 10:59:26, Sergey Senozhatsky wrote:
> > On (04/09/19 16:14), Petr Mladek wrote:
> > > We should:
> > > 
> > >    + Flush the latest messages before we replay the log.
> > 
> > Do you mean the pending messages? When we replay the log we also should
> > print "header line" and panic-cpu backtrace. So we will print panic-cpu
> > oops twice
> 
> console_flush_on_panic() is just the last resort. I believe
> that the panic header and backtrace reach the console even
> without it in most cases. Explicit flush before reply
> would just make it consistent.

I would agree. On big systems console_sem is usually unlocked (no fbcon,
no DRI, no tty writers, etc.) On desktops, laptops, and embedded device,
however, killing the kernel with console_sem locked is not entirely
uncommon.

> The panic() message is usually the most important one for debugging.
> I feel a bit uneasy that we would delay it until full replay that
> might get killed from several reasons:
>
>    + external monitoring system would force reboot
>
>    + user might realize, e.g. after 20 minutes, that the full
>      log reply was probably not worth it.
>
> I understand that people enabling this option would most likely
> wait but still. I do not see it as a big deal to repeat
> the messages.

Well, OK, this sounds reasonable. At the same time this option
depends on panic_print, which is probably debugging option anyway
and panic_print output can get a bit large and time consuming, so
maybe external monitors are not part of the picture when panic_print
is used. But no real objections; need to make sure that no one else,
except panic, will ever use that new symbol.

	-ss

  reply	other threads:[~2019-04-10  8:16 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 [this message]
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
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=20190410081610.GA25962@jagdpanzerIV \
    --to=sergey.senozhatsky.work@gmail.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=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox