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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180530095504.GD12230@jagdpanzerIV>
Date:   Wed, 30 May 2018 18:55:04 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:     Petr Mladek <pmladek@...e.com>
Cc:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Peter Zijlstra <peterz@...radead.org>,
        linux-kernel@...r.kernel.org,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Subject: Re: [PATCH] printk: drop in_nmi check from
 printk_safe_flush_on_panic()

On (05/30/18 10:48), Petr Mladek wrote:
> > diff --git a/kernel/panic.c b/kernel/panic.c
> > index 42e487488554..98a0493a59d3 100644
> > --- a/kernel/panic.c
> > +++ b/kernel/panic.c
> > @@ -148,6 +148,7 @@ void panic(const char *fmt, ...)
> >  	 * after setting panic_cpu) from invoking panic() again.
> >  	 */
> >  	local_irq_disable();
> > +	__printk_safe_enter();
> 
> I understand why you came with it but I am against this change without
> a proper research. This would redirect too valuable messages into
> a buffer of a limited size and postpone flushing them to the consoles.
> 
> We would need to really carefully compare chances where this would
> help and where it would make things worse. There is a high chance
> that we could come with a better solution once we have the analyze.

I agree, sure.

The thing is, we, in fact, already invoke panic() in printk_safe mode.
Sometimes.

Namely,

  nmi_panic() -> panic()

is invoked while we are in printk_nmi(), so all printk()-s go
to the per-CPU buffers. So, at least to some extent, panic()
in printk_safe context is not something never seen before. Just
saying.

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ