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: <20190409134109.ounidzwphouqr3w2@pathway.suse.cz>
Date:   Tue, 9 Apr 2019 15:41:09 +0200
From:   Petr Mladek <pmladek@...e.com>
To:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc:     Feng Tang <feng.tang@...el.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        linux-kernel@...r.kernel.org, Kees Cook <keescook@...omium.org>,
        Borislav Petkov <bp@...e.de>
Subject: Re: [PATCH 1/2] printk: Add an option to flush all messages on panic

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ