lkml.org 
[lkml]   [2019]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 3/3] sysrq: Warn about insufficient console_loglevel
On (01/11/19 17:20), Petr Mladek wrote:
> +static void warn_console(bool console_suppressed,
> + int orig_log_level,
> + struct sysrq_key_op *op_p)
> +{
> + static int warned;
> +
> + if (warned)
> + return;
> +
> + /* Do not warn when people are already setting loglevel via sysrq */
> + if (op_p->enable_mask & SYSRQ_ENABLE_LOG) {
> + warned = 1;
> + return;
> + }
> +
> + if (console_suppressed) {
> + pr_info("Messages filtered by console_loglevel (%d)%s\n",
> + orig_log_level,
> + sysrq_on_mask(SYSRQ_ENABLE_LOG) ? ", try SysRq+7" : "");
> + warned = 1;
> + }
> +}

I understand the intent.

Some comments:

- Not all of sysrq handlers printk() data. There are some quiet
handlers. E.g. sysrq_handle_unraw(). Having "Messages filtered by
console_loglevel" can be confusing.

- Not all sysrq handlers use INFO level.
E.g. sync_inodes_sb()->WARN_ON()->pr_warn(). So once again there can
be a "false positive" "Messages filtered" error, while in fact
no messages would be filtered out.

What do you think?

-ss

\
 
 \ /
  Last update: 2019-01-14 09:06    [W:2.142 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site