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: <e0016343-2091-2478-dde3-3136a60b0942@i-love.sakura.ne.jp>
Date:   Wed, 29 May 2019 00:21:52 +0900
From:   Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
To:     Petr Mladek <pmladek@...e.com>
Cc:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        Dmitry Safonov <dima@...sta.com>, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [RFC] printk/sysrq: Don't play with console_loglevel

On 2019/05/29 0:03, Petr Mladek wrote:
>> But is context dependent buffer large enough to hold SysRq-t output?
>> I think that only main logbuf can become large enough to hold SysRq-t output.
> 
> SysRq messages are stored directly into the main log buffer.
> 
> The limited per-CPU buffers are needed only in printk_safe
> and NMI context. We discussed it here because KERN_UNSUPPRESSED
> allows to pass the information even from this context.
> 
>> We can add KERN_UNSUPPRESSED to SysRq's header line. But I don't think
>> that we can automatically add KERN_UNSUPPRESSED to SysRq's body lines
>> based on some context information. If we want to avoid manipulating
>> console_loglevel, we need to think about how to make sure that
>> KERN_UNSUPPRESSED is added to all lines from such context without
>> overflowing capacity of that buffer.
> 
> We could set this context in printk_context per-CPU variable.
> 
> Then we could easily add the set per-message flag in
> vprintk_store() for the normal/atomic context. And we
> could store an extra KERN_UNSUPPRESSED in printk_safe_log_store()
> for printk_safe and NMI context.

Now I got what you are trying to do. Borrow per-CPU printk_context
flags for automatically prefixing KERN_UNSUPPRESSED, based on an
assumption that any message sent during that per-CPU printk_context
flag set is important enough. Then, what we need to be careful is
nesting of setting/clearing of that flag, for NMI handler might be
called during SysRq operation is in progress. We unconditionally
prefix KERN_UNSUPPRESSED if NMI?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ