Re: [RFC 3/3] sysrq: Warn about insufficient console_loglevel

From: Sergey Senozhatsky
Date: Mon Jan 14 2019 - 22:03:51 EST


On (01/14/19 15:59), Petr Mladek wrote:
> Yes, it has false positives. On the other hand, I do not think
> that a better message is worth even more complicated code.
>
> Either we find a better text, for example, use warning style:
>
> pr_warn("warning: messages are filtered by console loglevel (%d)%s\n"
>
> or hint style:
>
> pr_info("hint: make sure to see all messages by increasing the
> console logvel, ...

A box (laptop or desktop) can run X server and read logbuf via
/dev/kmsg or /proc/kmsg, IOW no suppress_message() filtering at
all yet we still will show "you lost some messages" warning. So
we are, sort of, never certain if any messages were filtered out,
in fact. Thus a hint style pr_info() is, probably, the best we
can do, but then I'm not totally sure if we want all that complexity
(exporting another printk() symbol, which somebody someday can
start (ab)using).

I'm not against this patch, so up to you guys.

-ss