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: <20190304032202.GD23578@jagdpanzerIV>
Date:   Mon, 4 Mar 2019 12:22:02 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:     Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Cc:     Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        John Ogness <john.ogness@...utronix.de>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] printk: Introduce "store now but print later" prefix.

On (02/23/19 13:42), Tetsuo Handa wrote:
[..]
> This patch tries to address "don't lockup the system" with minimal risk of
> failing to "print out printk() messages", by allowing printk() callers to
> tell printk() "store $body_text_lines lines into logbuf but start actual
> printing after $trailer_text_line line is stored into logbuf". This patch
> is different from existing printk_deferred(), for printk_deferred() is
> intended for scheduler/timekeeping use only. Moreover, what this patch
> wants to do is "do not try to print out printk() messages as soon as
> possible", for accumulated stalling period cannot be decreased if
> printk_deferred() from e.g. dump_tasks() from out_of_memory() immediately
> prints out the messages. The point of this patch is to defer the stalling
> duration to after leaving the critical section.

We can export printk deferred, I guess; but I'm not sure if it's going
to be easy to switch OOM to printk_deferred - there are lots of direct
printk callers: warn-s, dump_stacks, etc; it might even be simpler to
start re-directing OOM printouts to printk_safe buffer.

This is a bit of a strange issue, to be honest. If OOM prints too
many messages then we might want to do some work on the OOM side.

But, to begin with, can you give an example of such a lockup? Just
to understand how big/real the problem is.

What is that "OOM critical section" which printk can stall?

[..]
> The possibility of failing to store all printk() messages to logbuf might
> be increased by using "async" printk(). But since we have a lot of RAM
> nowadays, allocating large logbuf enough to hold the entire SysRq-t output
> using log_buf_len= kernel command line parameter won't be difficult.

Note, logbuf size is limited - 2G. Might be not as large as people
would want it to be.

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ