From: Alex Williamson <alex@shazbot.org>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jason Gunthorpe <jgg@ziepe.ca>, Armin Wolf <W_Armin@gmx.de>,
David Lechner <dlechner@baylibre.com>,
Danilo Krummrich <dakr@kernel.org>,
Luis Chamberlain <mcgrof@kernel.org>,
Petr Pavlu <petr.pavlu@suse.com>,
Daniel Gomez <da.gomez@kernel.org>,
Sami Tolvanen <samitolvanen@google.com>,
Aaron Tomlin <atomlin@atomlin.com>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Bradley Morgan <brads@mainlining.org>,
Aleksandr Nogikh <nogikh@google.com>,
linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, linux-usb@vger.kernel.org,
driver-core@lists.linux.dev, linux-trace-kernel@vger.kernel.org,
Johan Hovold <johan@kernel.org>,
Richard Weinberger <richard@nod.at>,
Thierry Reding <thierry.reding@kernel.org>,
alex@shazbot.org
Subject: Re: [PATCH v4 0/3] driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers
Date: Wed, 28 Oct 2026 09:41:39 -0600 [thread overview]
Message-ID: <20261028094139.12ea7c16@shazbot.org> (raw)
In-Reply-To: <auILBqh9Ccv7ztid@monoceros>
On Wed, 28 Oct 2026 15:50:44 +0100
Uwe Kleine-König <u.kleine-koenig@baylibre.com> wrote:
> On Wed, Oct 28, 2026 at 02:45:18PM +0100, Greg Kroah-Hartman wrote:
> > On Mon, Oct 26, 2026 at 07:59:50PM -0300, Jason Gunthorpe wrote:
> > > On Sun, Oct 25, 2026 at 01:48:04PM +0100, Uwe Kleine-König wrote:
> > >
> > > > The more I think about this taint, the more I believe the commit should
> > > > be reverted and replaced by a some stop gaps for driver_override. (Be it
> > > > a taint or better yet
> > > > https://lore.kernel.org/all/0f7446324f6a0c8f0153d6532d92a6eeecd6a308.1790612298.git.u.kleine-koenig@baylibre.com/
> > > > .)
> > >
> > > I also think this patch is way too broad and should be reverted until
> > > something better is designed.
> >
> > Fair enough, I've sent a revert for now, will get it merged before -rc1
> > is out.
>
> \o/, thanks
>
> > I'll rework this for a later release, thanks.
>
> Please look at the series behind the link above before investing time
> here. I think most of the ideas are already implemented there. If you
> voice your preferences there, I can rework accordingly and rebase on top
> of your revert.
From a vfio perspective, the concern with the linked series is that
driver_override always taints. That's the same regression we have
here; vfio use cases rely on driver_override. Introducing a driver
flag that allows a driver to opt-in to declare support for
driver_override, but then taints if it actually generates a match is
contradictory.
I had been working on a series that allowed match to return a match
type classification, for example 1 as a static match (for
compatibility), 2 for a dynamic match, and 3 for a driver_override
match. Anything other than a static match that reaches driver probe
generates a taint. Also note that generating a match doesn't
necessarily result in a driver probe callback, in at least one flow we
haven't even tested that the device isn't already bound to a driver.
The bus level match function can filter and downgrade the
classification, for example PCI has an override_only flag in its match
ID. vfio-pci and variant drivers thereof make use of this to avoid
becoming the default driver for devices. A driver_override that
matches the override_only match ID in the driver table can be demoted
to a static match and avoid tainting.
I'm not sure I understand the rationale for focusing only on
driver_override though, new_id has just as much ability to generate
bogus driver matches. It's also racy to use new_id if you're trying to
get a specific device bound to a driver, which is why driver_override
was invented. So we end up placing barriers to the use of the
interface that we've now long recommended as the better alternative to
new_id, while leaving the gaps in new_id wide open. Thanks,
Alex
next prev parent reply other threads:[~2026-10-28 15:41 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 14:30 [PATCH v4 0/3] driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers Greg Kroah-Hartman
2026-09-14 14:30 ` [PATCH v4 1/3] module: pull out add_taint_module() to be public Greg Kroah-Hartman
2026-09-14 14:30 ` [PATCH v4 2/3] module: fix up documentation for add_taint() and add_taint_module() Greg Kroah-Hartman
2026-09-14 14:42 ` Bradley Morgan
2026-09-18 15:44 ` Aaron Tomlin
2026-09-14 14:30 ` [PATCH v4 3/3] driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers Greg Kroah-Hartman
2026-09-18 16:39 ` [PATCH v4 0/3] " Danilo Krummrich
2026-09-18 17:25 ` Greg Kroah-Hartman
2026-09-18 17:29 ` Bradley Morgan
2026-09-22 7:39 ` Uwe Kleine-König
2026-09-22 13:40 ` David Lechner
2026-09-22 21:04 ` Armin Wolf
2026-09-23 6:29 ` Uwe Kleine-König
2026-09-23 9:27 ` Greg Kroah-Hartman
2026-09-23 9:54 ` Uwe Kleine-König
2026-09-23 10:29 ` Greg Kroah-Hartman
2026-10-24 0:13 ` Alex Williamson
2026-10-24 4:56 ` Greg Kroah-Hartman
2026-10-24 7:32 ` Uwe Kleine-König
2026-10-24 8:03 ` Danilo Krummrich
2026-10-24 16:35 ` Alex Williamson
2026-10-26 20:34 ` Greg Kroah-Hartman
2026-10-27 6:03 ` Michal Pecio
2026-10-27 8:05 ` Greg Kroah-Hartman
2026-10-25 12:48 ` Uwe Kleine-König
2026-10-26 22:59 ` Jason Gunthorpe
2026-10-28 13:45 ` Greg Kroah-Hartman
2026-10-28 14:50 ` Uwe Kleine-König
2026-10-28 15:08 ` Greg Kroah-Hartman
2026-10-28 15:41 ` Alex Williamson [this message]
2026-10-26 12:22 ` Leon Romanovsky
2026-10-26 18:43 ` Jason Gunthorpe
2026-10-26 20:05 ` Greg Kroah-Hartman
2026-10-26 22:46 ` Jason Gunthorpe
2026-10-26 20:27 ` Greg Kroah-Hartman
2026-10-26 22:55 ` Jason Gunthorpe
2026-10-27 9:01 ` Leon Romanovsky
2026-09-23 20:52 ` Armin Wolf
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=20261028094139.12ea7c16@shazbot.org \
--to=alex@shazbot.org \
--cc=W_Armin@gmx.de \
--cc=atomlin@atomlin.com \
--cc=brads@mainlining.org \
--cc=corbet@lwn.net \
--cc=da.gomez@kernel.org \
--cc=dakr@kernel.org \
--cc=dlechner@baylibre.com \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=jgg@ziepe.ca \
--cc=johan@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mcgrof@kernel.org \
--cc=mhiramat@kernel.org \
--cc=nogikh@google.com \
--cc=petr.pavlu@suse.com \
--cc=rafael@kernel.org \
--cc=rdunlap@infradead.org \
--cc=richard@nod.at \
--cc=rostedt@goodmis.org \
--cc=samitolvanen@google.com \
--cc=skhan@linuxfoundation.org \
--cc=thierry.reding@kernel.org \
--cc=u.kleine-koenig@baylibre.com \
/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