From: Bradley Morgan <brads@mainlining.org>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: Johan Hovold <johan@kernel.org>,
Aaron Tomlin <atomlin@atomlin.com>,
Danilo Krummrich <dakr@kernel.org>,
Thierry Reding <thierry.reding@kernel.org>,
David Lechner <dlechner@baylibre.com>,
Armin Wolf <W_Armin@gmx.de>,
linux-kernel@vger.kernel.org, driver-core@lists.linux.dev,
linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] Add TAINT_DRIVER_OVERRIDE for usage of driver_override
Date: Fri, 25 Sep 2026 21:30:34 +0100 [thread overview]
Message-ID: <897D45CE-C577-4DCB-90BA-5DA45AEA307B@mainlining.org> (raw)
In-Reply-To: <arbYJUnMkb8Mqbam@monoceros>
On 25 September 2026 21:28:29 BST, "Uwe Kleine-König"
<u.kleine-koenig@baylibre.com> wrote:
>Hello David,
>
>On Fri, Sep 25, 2026 at 08:20:40PM +0200, Uwe Kleine-König wrote:
>> Commit fcbfaffee51a ("driver core: add TAINT_FORCED_BIND for when
>> userspace manually messes with devices and drivers") introduced a taint
>> for usage of bind/unbind sysfs files that manually trigger driver probe
>> and remove respectively.
>>
>> For drivers that do their resource management correctly (which is also
>> needed for module unloading) bind and unbind for matching devices are
>> not critical operations. The thing that makes bind and unbind unsafe is
>> that drivers can be forced on devices that originally don't match using
>> driver_override. The result is that e.g. of_device_get_match_data()
>> returns NULL despite all .of_match_table entries having a non-NULL
>> .driver_data member which yields a NULL pointer exception for several
>> drivers. And given that after setting a driver_override a manual bind is
>> only one way a driver can be bound to an unexpected device, a separate
>> taint for such an override is justified.
>>
>> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
>
>Sashiko found an issue in the oneline shell script, I fixed that in a
>separate commit because it wasn't introduced in my patch.
>
>Also I violated my own rule not to send patches directly before calling
>it a day and so missed to squash in the build fix that Sashiko also
>found 🤦.
>
Hah! A emoji 🥺
>I wait a bit before sending a v2, but if you want to take a glimpse
>already on the changes I did, look at
>
> https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git driver_override-taint
>
>Best regards
>Uwe
>
--- Thanks!
https://lore.kernel.org/all/EE579805-42F2-4C58-B752-F28779EEB717@grrlz.net/
prev parent reply other threads:[~2026-09-25 20:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 18:20 Uwe Kleine-König
2026-09-25 18:42 ` Bradley Morgan
2026-09-25 18:59 ` Armin Wolf
2026-09-25 20:28 ` Uwe Kleine-König
2026-09-25 20:30 ` Bradley Morgan [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=897D45CE-C577-4DCB-90BA-5DA45AEA307B@mainlining.org \
--to=brads@mainlining.org \
--cc=W_Armin@gmx.de \
--cc=atomlin@atomlin.com \
--cc=dakr@kernel.org \
--cc=dlechner@baylibre.com \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.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®