From: Greg KH <gregkh@linuxfoundation.org>
To: Bradley Morgan <brads@mainlining.org>
Cc: atomlin@atomlin.com, corbet@lwn.net, da.gomez@kernel.org,
dakr@kernel.org, driver-core@lists.linux.dev,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-modules@vger.kernel.org,
linux-trace-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
mathieu.desnoyers@efficios.com, mcgrof@kernel.org,
mhiramat@kernel.org, petr.pavlu@suse.com, rafael@kernel.org,
rdunlap@infradead.org, rostedt@goodmis.org,
samitolvanen@google.com, skhan@linuxfoundation.org
Subject: Re: [PATCH 2/2] driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers
Date: Wed, 26 Aug 2026 15:10:14 +0200 [thread overview]
Message-ID: <2026082604-freewill-pretzel-0057@gregkh> (raw)
In-Reply-To: <C35F2CF9-9CD7-482F-8F30-2D152AB42D0B@mainlining.org>
On Wed, Aug 26, 2026 at 12:58:00PM +0100, Bradley Morgan wrote:
> On 26 August 2026 10:19:33 BST, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >The ability to add and remove devices from a driver through the sysfs
> >"bind" and "unbind" files was created all those decades ago as a way
> >that kernel developers can iterate faster, and provide a debugging way
> >for users to attempt to add a new device to a driver without having to
> >rebuild their kernel.
> >
> >This api over the years has been abused and recently come under a major
> >fuzzing "attack" through tools like syzbot which decided that it would
> >attempt to just randomly bind any driver to any type of device, causing
> >loads of unneeded errors and pointless kernel patches to be generated by
> >unsuspecting new developers.
> >
> >Handle all of this by adding a new taint flag, TAINT_FORCED_BIND, which
> >will be set on the driver if the bind/unbind sysfs files are ever
> >successfully written to. This lets kernel developers "know" that a user
> >is attempting to do something that is not normal, and as such, if the
> >kernel breaks they get to keep the shiny pieces laying around on the
> >floor.
> >
> >Note, the taint flag gets set _BEFORE_ the bind/unbind callback happens,
> >as many times crashes/oops/warnings/failures happen within the callback,
> >and the taint flag needs to be there to show what was being attempted.
> >If it were to be set after the callback happens, the oops report would
> >not properly reflect what foolishness was being attempted.
> >
>
> sashiko found a couple valid concerns for 2/2
Yes, will fix that for v2.
thanks,
greg k-h
next prev parent reply other threads:[~2026-08-26 13:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 9:19 [PATCH 0/2] driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers Greg Kroah-Hartman
2026-08-26 9:19 ` [PATCH 1/2] module: pull out add_taint_module() to be public Greg Kroah-Hartman
2026-08-26 10:29 ` sashiko-bot
2026-08-26 10:39 ` Greg Kroah-Hartman
2026-08-26 11:13 ` Aaron Tomlin
2026-08-26 11:54 ` Greg Kroah-Hartman
2026-08-27 13:36 ` Johan Hovold
2026-08-27 14:30 ` Greg Kroah-Hartman
2026-08-26 9:19 ` [PATCH 2/2] driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers Greg Kroah-Hartman
2026-08-26 10:34 ` sashiko-bot
2026-08-26 11:58 ` Bradley Morgan
2026-08-26 13:10 ` Greg KH [this message]
2026-08-26 14:26 ` Steven Rostedt
2026-08-26 14:34 ` Bradley Morgan
2026-08-27 13:33 ` Johan Hovold
2026-08-26 13:33 ` [PATCH 0/2] " Michal Pecio
2026-08-26 14:25 ` Greg Kroah-Hartman
2026-08-26 15:35 ` Michal Pecio
2026-08-26 15:44 ` Greg Kroah-Hartman
2026-08-26 17:09 ` Michal Pecio
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=2026082604-freewill-pretzel-0057@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=atomlin@atomlin.com \
--cc=brads@mainlining.org \
--cc=corbet@lwn.net \
--cc=da.gomez@kernel.org \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--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=petr.pavlu@suse.com \
--cc=rafael@kernel.org \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=samitolvanen@google.com \
--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