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  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]
Date:   Wed, 13 May 2020 20:03:53 +0900
From:   Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
To:     Petr Mladek <pmladek@...e.com>
Cc:     Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Michal Hocko <mhocko@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        linux-kernel@...r.kernel.org, Dmitry Safonov <dima@...sta.com>,
        Yafang Shao <laoar.shao@...il.com>
Subject: Re: [PATCH] printk: Add loglevel for "do not print to consoles".

On 2020/05/13 19:04, Petr Mladek wrote:
>> What is wrong with adding NO_CONSOLES ?
> 
> How does it differ from KERN_DEBUG? The debug messages:
> 
>   + can be disabled via sysfs
>   + might reach console when this loglevel is enabled

KERN_NO_CONSOLES is different from KERN_DEBUG in that KERN_NO_CONSOLES
itself does not affect userspace daemon's judgement (whether to filter
KERN_$LOGLEVEL messages).

> What is so special about  OOM dump task so that it would deserve such
> complications?

OOM dump task is special in that it can generate thousands of KERN_INFO
messages. If such messages are printed to consoles, it defers solving OOM
situation.

But setting /proc/sys/vm/oom_dump_tasks to 0 causes such messages being
not delivered to userspace daemon for later analysis. Therefore, we can not
set /proc/sys/vm/oom_dump_tasks to 0 if we want to save such messages for
later analysis.

Changing console loglevel (e.g. setting "quiet" kernel command line option)
in order to hide such messages also prevents all other KERN_INFO messages from
being printed to consoles. Since some KERN_INFO messages are worth printing to
consoles while other KERN_INFO messages are worth printing to consoles,
controlling with

>   + loglevel assigned to each message

is inevitable.

I think that basically only oops (e.g. WARN()/BUG()/panic()) messages worth
printing to consoles and the rest messages do not worth printing to consoles.
Existing KERN_$LOGLEVEL is too rough-grained.

Powered by blists - more mailing lists