On 25 September 2026 21:28:29 BST, "Uwe Kleine-König"
<[email protected]> 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 <[email protected]>
>
>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/[email protected]/

Reply via email to