[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250410212532.01646a92@gandalf.local.home>
Date: Thu, 10 Apr 2025 21:25:32 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Linus Torvalds
<torvalds@...ux-foundation.org>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, Akinobu Mita <akinobu.mita@...il.com>, Peter
Zijlstra <peterz@...radead.org>, Petr Mladek <pmladek@...e.com>, Dmitry
Vyukov <dvyukov@...gle.com>, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC][PATCH] panic: lib: Add TAINT for FAULT_INJECTION
On Thu, 10 Apr 2025 13:51:14 -0700
Andrew Morton <akpm@...ux-foundation.org> wrote:
> > It may also be useful for other bug reports.
>
> Seems sane. Does any userspace tooling need an update for this?
Well, the syzbot does show the taints in their reports. It can use that to
explicitly state that the kernel has fault injections, or at least the
developer can see the taint.
>
> > --- a/lib/fault-inject.c
> > +++ b/lib/fault-inject.c
> > @@ -176,6 +176,9 @@ bool should_fail_ex(struct fault_attr *attr, ssize_t size, int flags)
> > if (atomic_read(&attr->times) != -1)
> > atomic_dec_not_zero(&attr->times);
> >
> > + pr_notice_once("Tainting kernel with TAINT_FAULT_INJECTION\n");
> > + add_taint(TAINT_FAULT_INJECTION, LOCKDEP_STILL_OK);
>
> if (pr_notice_once("Tainting kernel with TAINT_FAULT_INJECTION\n"))
> add_taint(TAINT_FAULT_INJECTION, LOCKDEP_STILL_OK);
>
> perhaps?
I'm fine with that too. I can send a v2.
-- Steve
>
> > return true;
> > }
> >
Powered by blists - more mailing lists