mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Pecio <michal.pecio@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Alex Williamson" <alex@shazbot.org>,
	"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
	"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>,
	"Jason Gunthorpe" <jgg@ziepe.ca>
Subject: Re: [PATCH v4 0/3] driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers
Date: Tue, 27 Oct 2026 07:03:00 +0100	[thread overview]
Message-ID: <20261027070300.4c45616a.michal.pecio@gmail.com> (raw)
In-Reply-To: <2026102637-buggy-mothball-2a08@gregkh>

On Mon, 26 Oct 2026 21:34:57 +0100, Greg Kroah-Hartman wrote:
> > Even if we could come up with a set of device IDs, it's a policy
> > decision whether a given device is intended by the admin to be used
> > by the default in-kernel driver or a userspace driver.  
> 
> Great, then have the admin never allow the in-kernel driver to be on
> the system, or be loaded (modprobe has deny lists) and all is fine.

As some maintainers like to say, it's not the '90s anymore :)

Users don't reboot systems to kick a kernel driver off a PCI device to
try something in a disposable VM on a whim.

Even if they did, it's completely normal for desktop users to have two
GPUs from the same vendor or two xHCI controllers and pass only one of
them to Windows/macOS while using the other on the host.

bind/unbind feature prominently on every distribution wiki and forum,
this cat is absolutely out of the bag at this point.

> > That means that at one point we want the default driver bound and at
> > another we want a vfio driver bound.  Coordinating this is exactly
> > why we have driver_override and, building on that, match IDs that
> > require driver_override.  This allows drivers to describe
> > themselves as vfio-pci compatible drivers via modules.alias while
> > requiring userspace to enable the match via driver_override.  
> 
> And as said before, that's a horrid hack and one that is breaking
> things today in all sorts of ways, which is why the taint was added.

Are you aware of bind/unbind breaking things for PCI specifically?

Without also involving 'driver_override' or 'new_id'? Everyone agrees
that these APIs used for anything other than pci-stub or vfio are foot
guns. But your patch targets something different.

We can even bind PCI drivers to wrong devices *without* using bind and
hence, I presume but don't care to test, without tripping this taint.

> If you wish to override the kernel, then great, a taint flag is added
> and all is fine.  All this means is that now developers know what you
> did and can decide to ignore your bug report or not.  No functionality
> changed at all.

I believe people pointed out that it's a functional change for users of
panic_on_taint who also use bind without being idiots.

Does this taint even solve a "real" problem? Those bug reports weren't
coming from users, they were coming from "abusers" like syzbot looking
for trouble. They were quite obvious even without a taint message.

And at least on linux-usb, they seem to have stopped after Google and
one other copycat were told to stop sending them, and before this taint
reaches released kernels.

I even told them to block not only bind but also new_id, so there will
be no second wave of reports caused by syzbot discovering that it can
bypass the taint by using new_id intsead of driver_override.

> Why are you worried about a taint flag?  So many servers run with
> taint flags enabled due to out-of-tree or questionable licenses with
> no problems, what's one more informational bit here?

And what's the point of a flag which is always set on countless normal
systems in the wild? If this feature survives to April 1st, I will send
a patch to rename it to "VM passthrough taint" because everybody (or at
least those dealing with desktop users) knows what it *really* means.

Regards,
Michal

  reply	other threads:[~2026-10-27  6:03 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14 14:30 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 [this message]
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-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=20261027070300.4c45616a.michal.pecio@gmail.com \
    --to=michal.pecio@gmail.com \
    --cc=W_Armin@gmx.de \
    --cc=alex@shazbot.org \
    --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

all inboxes | Powered by JetHome®