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]
Date:   Thu, 2 Feb 2017 19:03:48 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        Petr Mladek <pmladek@...e.com>, Jan Kara <jack@...e.cz>,
        Ross Zwisler <zwisler@...il.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Ross Zwisler <ross.zwisler@...ux.intel.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Tejun Heo <tj@...nel.org>, Calvin Owens <calvinowens@...com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Hurley <peter@...leysoftware.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCHv7 6/8] printk: use printk_safe buffers in printk

On (02/02/17 10:07), Peter Zijlstra wrote:
> On Thu, Feb 02, 2017 at 11:11:34AM +0900, Sergey Senozhatsky wrote:
> > On (02/01/17 16:39), Petr Mladek wrote:
> > [..]
> > > I guess that you are talking about the introduction of
> > > #define SCHED_WARN_ON(x)	WARN_ONCE(x, #x)
> > 
> > my guess would be that Jan was talking about printk_deferred() patch.
> > it's on my TODO list.
> > 
> > I want to entirely remove console_sem and scheduler out of printk() path.
> > that's the only way to make printk() deadlock safe.
> 
> And useless.. if you never get around to the 'later' part where you
> print the content. This way you still mostly get the output.

well, I wouldn't say that printk_deferred() has less chances. I see your
point, of course. but with printk_deferred() we, at least, will have messages
in logbuf (or printk_safe buffers), so they can appear in crash dump, for
instance. that "later" part can be sysrq, for example, or panic->flush_on_panic(),
etc. if "normal" printk->queue irq_work doesn't work.

needless to say, that in this particular case (WARN from sched), if the
first printk() out of N printk()-s, which sched core calls to dump_stack(),
deadlocks, then we got nothing to print/dump.

> And no, its not the only way, see my printk->early_printk patches. early
> serial console only does a loop over outb, impossible to mess that up.

certainly :)

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ