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



On 4/24/20 4:42 PM, Steven Rostedt wrote:
> On Sat, 25 Apr 2020 00:28:53 +0900
> Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp> wrote:
>> For those who analyze log files (instead of console output), the point of
>> printk() is to save kernel messages into log files (via userspace syslog
>> daemon).
>>
>> By the way, I think
>>
>>   printk(KERN_NO_CONSOLES "hello\n")
>>
>> is almost same with doing
>>
>>   saved_loglevel = console_loglevel;
>>   console_loglevel = CONSOLE_LOGLEVEL_SILENT;
>>   printk("hello\n");
>>   console_loglevel = saved_loglevel;
>>
>> used by vkdb_printf().
> 
> And both shouldn't be done within the kernel. The "CONSOLE_LOGLEVEL_SILENT"
> if for user decided policy, not the kernel making that policy for the user.

Though, I believe the reverse KERN_UNSUPPRESSED [1] still makes sense
for sysrq/kdb where user expects their interactive messages to appear on
console. And unfortunately, userspace depends on the loglevel of those
messages as it is.
With KERN_UNSUPPRESSED I hope to remove all those console_loglevel
tricks and make it static variable for printk.

[1]: https://lore.kernel.org/lkml/20190528002412.1625-1-dima@arista.com/

Thanks,
          Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ