Linux Trace Kernel
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jonathan Corbet <corbet@lwn.net>,
	 Shuah Khan <skhan@linuxfoundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	 "Rafael J. Wysocki" <rafael@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>,
	 Johan Hovold <johan@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	 Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	 linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	driver-core@lists.linux.dev,  linux-trace-kernel@vger.kernel.org,
	Leon Romanovsky <leon@kernel.org>,
	 Jason Gunthorpe <jgg@ziepe.ca>,
	Michal Pecio <michal.pecio@gmail.com>
Subject: Re: [PATCH] Revert "driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers"
Date: Thu, 29 Oct 2026 18:39:16 +0100	[thread overview]
Message-ID: <auODHyLrfQylISX2@monoceros> (raw)
In-Reply-To: <20261028-bind_taint-revert-v1-1-7c6b9cef30c9@linuxfoundation.org>

[-- Attachment #1: Type: text/plain, Size: 3747 bytes --]

On Wed, Oct 28, 2026 at 02:42:15PM +0100, Greg Kroah-Hartman wrote:
> This reverts commit fcbfaffee51a452cc8efcbaa3b88ec4595678424.
> 
> Turns out that vfio is a crazy beast and people have been "relying" on
> the bind/unbind debugging feature as a way to handle passing through
> devices to guest instances.  Because of this (https://xkcd.com/1172/),
> let's revert the feature for now until we can figure out a more agreable
> way to handle this such that normal workflows do not taint the kernel.
> 
> Odds are something like what Uwe proposes at:
> 	https://lore.kernel.org/lkml/cover.1790612298.git.u.kleine-koenig@baylibre.com/
> will be the best way forward and will be revisited after for after 7.4.
> 
> The feature was originally intended to stem the flow of unnecessary
> fuzzing reports of "broken" drivers where random devices were being
> bound to random drivers and of course things were going wrong.  The main
> syzbot tool is now not doing this anymore, and hopefully no one else
> starts it up again (but in this madness of LLMs these days, you can't be
> sure.)
> 
> Thanks to everyone for telling me just how wrong I was to implement
> this, I appreciated the feedback :)
> 
> Link: https://lore.kernel.org/all/DLIL9H50MALI.3JROXYEEUM3KU@kernel.org/
> To: Jonathan Corbet <corbet@lwn.net>
> To: Shuah Khan <skhan@linuxfoundation.org>
> To: Randy Dunlap <rdunlap@infradead.org>
> To: "Rafael J. Wysocki" <rafael@kernel.org>
> To: Danilo Krummrich <dakr@kernel.org>
> To: Johan Hovold <johan@kernel.org>
> To: Steven Rostedt <rostedt@goodmis.org>
> To: Masami Hiramatsu <mhiramat@kernel.org>
> To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Reported-by: Leon Romanovsky <leon@kernel.org>
> Reported-by: Jason Gunthorpe <jgg@ziepe.ca>
> Reported-by: Michal Pecio <michal.pecio@gmail.com>
> Reported-by: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  Documentation/admin-guide/tainted-kernels.rst | 52 +++++++++++++--------------
>  drivers/base/bus.c                            |  3 --
>  include/linux/panic.h                         |  3 +-
>  include/trace/events/module.h                 |  3 +-
>  kernel/panic.c                                |  5 ++-
>  tools/debugging/kernel-chktaint               |  8 -----
>  6 files changed, 28 insertions(+), 46 deletions(-)
> 
> diff --git a/Documentation/admin-guide/tainted-kernels.rst b/Documentation/admin-guide/tainted-kernels.rst
> index a208811ad525..3d312bc17942 100644
> --- a/Documentation/admin-guide/tainted-kernels.rst
> +++ b/Documentation/admin-guide/tainted-kernels.rst

It's not part of commit fcbfaffee51a452cc8efcbaa3b88ec4595678424, but
conceptually we need 

diff --git a/Documentation/admin-guide/tainted-kernels.rst b/Documentation/admin-guide/tainted-kernels.rst
index 3d312bc17942..fcb8b9734548 100644
--- a/Documentation/admin-guide/tainted-kernels.rst
+++ b/Documentation/admin-guide/tainted-kernels.rst
@@ -74,7 +74,7 @@ a particular type of taint. It's best to leave that to the aforementioned
 script, but if you need something quick you can use this shell command to check
 which bits are set::
 
-	$ for i in $(seq 0 20); do echo $i $(($(cat /proc/sys/kernel/tainted)>>$i&1));done
+	$ for i in $(seq 0 19); do echo $i $(($(cat /proc/sys/kernel/tainted)>>$i&1));done
 
 Table for decoding tainted state
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

in this change which was fixed in commit f1850e443b0e ("docs:
admin-guide: Handle TAINT_FORCED_BIND when parsing
/proc/sys/kernel/tainted"), but that commit shouldn't be reverted as it
contains a simplification that we should keep.

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2026-10-29 17:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 13:42 [PATCH] Revert "driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers" Greg Kroah-Hartman
2026-10-29 17:39 ` Uwe Kleine-König [this message]
2026-10-29 20:02   ` Danilo Krummrich

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=auODHyLrfQylISX2@monoceros \
    --to=u.kleine-koenig@baylibre.com \
    --cc=corbet@lwn.net \
    --cc=dakr@kernel.org \
    --cc=driver-core@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=jgg@ziepe.ca \
    --cc=johan@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=michal.pecio@gmail.com \
    --cc=rafael@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=skhan@linuxfoundation.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