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]
Date:   Tue, 28 Apr 2020 17:45:32 +0200
From:   Michal Hocko <mhocko@...nel.org>
To:     Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Cc:     Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Petr Mladek <pmladek@...e.com>,
        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 Tue 28-04-20 22:11:19, Tetsuo Handa wrote:
> On 2020/04/28 21:18, Michal Hocko wrote:
> > On Tue 28-04-20 20:33:21, Tetsuo Handa wrote:
> >> On 2020/04/27 15:21, Sergey Senozhatsky wrote:
> >>>> KERN_NO_CONSOLES is for type of messages where "saved for later analysis" is
> >>>> important but "printed for immediate notification" is not important.
> >>>> In other words, KERN_NO_CONSOLES is NOT for dying messages where "printed for
> >>>> immediate notification" is important.
> >>>
> >>> per-console loglevel is a user configurable parameter.
> >>> KERN_NO_CONSOLES is a hard-coded policy.
> >>
> >> But given that whether to use KERN_NO_CONSOLES is configurable via e.g. sysctl,
> >> KERN_NO_CONSOLES will become a user configurable parameter. What's still wrong?
> > 
> > How do I as a kernel developer know that KERN_NO_CONSOLES should be
> > used? In other words, how can I assume what a user will consider
> > important on the console?
> > 
> 
> Existing KERN_$LEVEL allows a user to determine whether he/she wants that message
> to be printed on consoles (even if it spams his/her operation doing on consoles), and
> at the same time constrains that user whether that message is saved to log files.
> KERN_NO_CONSOLES allows a user to control whether he/she wants that message to be
> saved to log files (without spamming his/her operation doing on consoles).

I understand that. But how do I know whether the user considers the
particular information important enough to be dumped on the console.
This sounds like a policy in the kernel to me. I simply cannot forsee
any console configuration to tell whether my information is going to
swamp the console to no use or not. Compare that to KERN_$LEVEL instead.
I know that an information is of low/high importance. It is the user
policy to decide and base some filtering on top of that priority.
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ