From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Akinobu Mita <akinobu.mita@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Petr Mladek <pmladek@suse.com>,
Dmitry Vyukov <dvyukov@google.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] panic: lib: Add TAINT for FAULT_INJECTION
Date: Fri, 11 Apr 2025 16:32:36 +0200 [thread overview]
Message-ID: <2025041158-opal-aspirin-5909@gregkh> (raw)
In-Reply-To: <20250411085355.118180b4@gandalf.local.home>
On Fri, Apr 11, 2025 at 08:53:55AM -0400, Steven Rostedt wrote:
> --- 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);
>
> + if (pr_notice_once("Tainting kernel with TAINT_FAULT_INJECTION\n"))
> + add_taint(TAINT_FAULT_INJECTION, LOCKDEP_STILL_OK);
It took me a while to think that this is the proper place to put it, but
it seems reasonable enough in the end, as you only will set the flag if
a "failure" actually happens.
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
prev parent reply other threads:[~2025-04-11 14:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-11 12:53 [PATCH] panic: lib: Add TAINT for FAULT_INJECTION Steven Rostedt
2025-04-11 14:32 ` Greg Kroah-Hartman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2025041158-opal-aspirin-5909@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dvyukov@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox