Thread (31 messages) 31 messages, 12 authors, 2021-11-22

Re: [PATCH v2 0/2] Introduce the pkill_on_warn parameter

From: Marco Elver <elver@google.com>
Date: 2021-11-14 14:21:37
Also in: linux-doc, linux-fsdevel, linux-hardening, lkml

On Sat, Nov 13, 2021 at 11:58AM -0800, Linus Torvalds wrote:
On Sat, Nov 13, 2021 at 10:14 AM Alexander Popov [off-list ref] wrote:
[...]
Honestly, if the intent is to not have to parse the dmesg output, then
I think it would be much better to introduce a new /proc file to read
the kernel tainting state, and then some test manager process could be
able to poll() that file or something. Not sending a signal to random
targets, but have a much more explicit model.

That said, I'm not convinced that "just read the kernel message log"
is in any way wrong either.
We had this problem of "need to get errors/warnings that appear in the
kernel log" without actually polling the kernel log all the time. Since
5.12 there's the 'error_report' tracepoint for exactly this purpose [1].

Right now it only generates events on KASAN and KFENCE reports, but we
imagined it's easy enough to extend with more types. Like WARN, should
the need arise (you'd have to add it if you decide to go down that
route).

So you could implement a close-enough variant of the whole thing in
userspace using what tracepoints give you by just monitoring the trace
pipe. It'd be much easier to experiment with different policies as well.

[1] https://git.kernel.org/torvalds/c/9c0dee54eb91d48cca048bd7bd2c1f4a166e0252 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help