From: Greg KH <gregkh@linuxfoundation.org>
To: Danilo Krummrich <dakr@kernel.org>
Cc: rafael@kernel.org, linux@armlinux.org.uk, nipun.gupta@amd.com,
nikhil.agarwal@amd.com, kys@microsoft.com,
haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com,
longli@microsoft.com, andersson@kernel.org,
mathieu.poirier@linaro.org, driver-core@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org
Subject: Re: [PATCH v2 0/5] treewide: Convert buses to use generic driver_override
Date: Fri, 22 May 2026 13:11:18 +0200 [thread overview]
Message-ID: <2026052210-surplus-earthling-c205@gregkh> (raw)
In-Reply-To: <20260505133935.3772495-1-dakr@kernel.org>
On Tue, May 05, 2026 at 03:37:20PM +0200, Danilo Krummrich wrote:
> This is the follow-up of the driver_override generalization in [1], converting
> the remaining 4 busses and removing the now-unused driver_set_override() helper.
>
> All of them are prone to the potential UAF described in [2], caused by accessing
> the driver_override field from their corresponding match() callback.
>
> In order to address this, the generalized driver_override field in struct device
> is protected with a spinlock. The driver-core provides accessors, such as
> device_match_driver_override(), device_has_driver_override() and
> device_set_driver_override(), which all ensure proper locking internally.
>
> Additionally, the driver-core provides a driver_override flag in struct
> bus_type, which, once enabled, automatically registers generic sysfs callbacks,
> allowing userspace to modify the driver_override field.
>
> This series is based on v7.1-rc1 with no additional dependencies, hence those
> patches can be picked up by subsystems individually.
>
> [1] https://lore.kernel.org/driver-core/20260303115720.48783-1-dakr@kernel.org/
> [2] https://bugzilla.kernel.org/show_bug.cgi?id=220789
> [3] https://gitlab.com/driverctl/driverctl/-/blob/0.121/driverctl?ref_type=tags#L99
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
prev parent reply other threads:[~2026-05-22 11:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 13:37 [PATCH v2 0/5] treewide: Convert buses to use generic driver_override Danilo Krummrich
2026-05-05 13:37 ` [PATCH v2 1/5] amba: use generic driver_override infrastructure Danilo Krummrich
2026-05-05 13:37 ` [PATCH v2 2/5] cdx: " Danilo Krummrich
2026-05-05 13:37 ` [PATCH v2 3/5] Drivers: hv: vmbus: " Danilo Krummrich
2026-05-05 13:37 ` [PATCH v2 4/5] rpmsg: " Danilo Krummrich
2026-05-05 13:37 ` [PATCH v2 5/5] driver core: remove driver_set_override() Danilo Krummrich
2026-05-11 18:02 ` [PATCH v2 0/5] treewide: Convert buses to use generic driver_override Danilo Krummrich
2026-05-19 11:09 ` Danilo Krummrich
2026-05-22 11:11 ` Greg KH [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=2026052210-surplus-earthling-c205@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=andersson@kernel.org \
--cc=dakr@kernel.org \
--cc=decui@microsoft.com \
--cc=driver-core@lists.linux.dev \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=longli@microsoft.com \
--cc=mathieu.poirier@linaro.org \
--cc=nikhil.agarwal@amd.com \
--cc=nipun.gupta@amd.com \
--cc=rafael@kernel.org \
--cc=wei.liu@kernel.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