All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] driver core: Disable driver overriding by default
@ 2026-11-16 11:08 Uwe Kleine-König
  2026-11-16 11:36 ` sashiko-bot
                   ` (4 more replies)
  0 siblings, 5 replies; 33+ messages in thread
From: Uwe Kleine-König @ 2026-11-16 11:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jonathan Corbet, Shuah Khan, Randy Dunlap, Rafael J. Wysocki,
	Danilo Krummrich, Johan Hovold, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, David Lechner, Armin Wolf, Thierry Reding,
	Mike Rapoport (Microsoft), Arnd Bergmann, Karl Mehltretter,
	Paul E. McKenney, Borislav Petkov (AMD), Dapeng Mi, Marco Elver,
	Ethan Nelson-Moore, Jeff Layton, Bradley Morgan, Andrew Morton,
	Petr Mladek, Pnina Feder, Mete Durlu, Aaron Tomlin, Rio,
	Feng Tang, linux-doc, linux-kernel, driver-core,
	linux-trace-kernel, Mark Brown, Bjorn Helgaas, Alex Williamson

Driver overriding is useful only in a very limited set of situations
and then only with very few drivers that are designed to support that.

Disallow matching via driver_override unless the driver explicitly
allows it or the safe guard is disabled using the
"allow_driver_override=1" kernel parameter.

There are many drivers that don't expect to be force-bound and often
doing it anyhow results in a NULL pointer exception. To make debugging
such cases easier, add a new taint if such a forced match happens.

Implementation detail: device_match_driver_override() isn't a static
inline any more. It grew a certain complexity (e.g. a pr_info()) and so
was made a regular exported function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
Hello,

this is a rebase to current next of the series
https://lore.kernel.org/all/cover.1790612298.git.u.kleine-koenig@baylibre.com/
. It combines the functionality of former patches #2 and #3 (#1 was a
fix that was already applied). I also addressed sashiko's comments. I think
this matches what most people want in the previous discussion.

As the rebase wasn't trivial and I merged the two patches, I didn't
apply the review tags I already received for v3.

If this patch is accepted, a number of drivers that are supposed to be
force-bound need to get their .support_driver_override property set. I'm
aware of the following:

 - spidev_spi_driver in drivers/spi/spidev.c
 - stub_driver in drivers/pci/pci-stub.c
 - uio_dmem_genirq in drivers/uio/uio_dmem_genirq.c
 - uio_pci_driver in drivers/uio/uio_pci_generic.c
 - uio_pdrv_genirq in drivers/uio/uio_pdrv_genirq.c
 - vfio_amba_driver in drivers/vfio/platform/vfio_amba.c
 - vfio_ccw_sch_driver in drivers/s390/cio/vfio_ccw_drv.c
 - vfio_pci_driver in drivers/vfio/pci/vfio_pci.c
 - vfio_platform_driver in drivers/vfio/platform/vfio_platform.c

This is not needed for the userspace i2c driver.

As the flag to set is only introduced in this patch and assuming this
patch is accepted, I suggest to create an immutable branch for it to
allow setting the needed flags in driver trees. Alternatively let all
these go together via a single tree or branch.

Best regards
Uwe

 .../admin-guide/kernel-parameters.txt         |  6 +++
 Documentation/admin-guide/tainted-kernels.rst | 54 ++++++++++---------
 drivers/base/bus.c                            | 50 +++++++++++++++++
 include/linux/device.h                        | 19 +------
 include/linux/device/driver.h                 |  2 +
 include/linux/panic.h                         |  3 +-
 include/trace/events/module.h                 |  3 +-
 kernel/panic.c                                |  3 +-
 tools/debugging/kernel-chktaint               |  9 ++++
 9 files changed, 104 insertions(+), 45 deletions(-)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 85804cfe7ef6..aabc97feef9b 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -424,6 +424,12 @@ Kernel parameters
 			do not want to use tracing_snapshot_alloc() as it needs
 			to be done where GFP_KERNEL allocations are allowed.
 
+	allow_driver_override=
+			When set to 1 allow matching drivers without
+			.support_driver_override = true to devices using
+			driver_override. This is a dangerous operation in
+			general allowing root to oops the kernel.
+
 	allow_mismatched_32bit_el0 [ARM64,EARLY]
 			Allow execve() of 32-bit applications and setting of the
 			PER_LINUX32 personality on systems where only a strict
diff --git a/Documentation/admin-guide/tainted-kernels.rst b/Documentation/admin-guide/tainted-kernels.rst
index fcb8b9734548..e6bab575ccef 100644
--- a/Documentation/admin-guide/tainted-kernels.rst
+++ b/Documentation/admin-guide/tainted-kernels.rst
@@ -74,35 +74,36 @@ a particular type of taint. It's best to leave that to the aforementioned
 script, but if you need something quick you can use this shell command to check
 which bits are set::
 
-	$ for i in $(seq 0 19); do echo $i $(($(cat /proc/sys/kernel/tainted)>>$i&1));done
+	$ for i in $(seq 0 20); do echo $i $(($(cat /proc/sys/kernel/tainted)>>$i&1));done
 
 Table for decoding tainted state
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-===  ===  ======  ========================================================
-Bit  Log  Number  Reason that got the kernel tainted
-===  ===  ======  ========================================================
-  0  G/P       1  proprietary module was loaded
-  1  _/F       2  module was force loaded
-  2  _/S       4  kernel running on an out of specification system
-  3  _/R       8  module was force unloaded
-  4  _/M      16  processor reported a Machine Check Exception (MCE)
-  5  _/B      32  bad page referenced or some unexpected page flags
-  6  _/U      64  taint requested by userspace application
-  7  _/D     128  kernel died recently, i.e. there was an OOPS or BUG
-  8  _/A     256  ACPI table overridden by user
-  9  _/W     512  kernel issued warning
- 10  _/C    1024  staging driver was loaded
- 11  _/I    2048  workaround for bug in platform firmware applied
- 12  _/O    4096  externally-built ("out-of-tree") module was loaded
- 13  _/E    8192  unsigned module was loaded
- 14  _/L   16384  soft lockup occurred
- 15  _/K   32768  kernel has been live patched
- 16  _/X   65536  auxiliary taint, defined for and used by distros
- 17  _/T  131072  kernel was built with the struct randomization plugin
- 18  _/N  262144  an in-kernel test has been run
- 19  _/J  524288  userspace used a mutating debug operation in fwctl
-===  ===  ======  ========================================================
+===  ===  =======  ========================================================
+Bit  Log   Number  Reason that got the kernel tainted
+===  ===  =======  ========================================================
+  0  G/P        1  proprietary module was loaded
+  1  _/F        2  module was force loaded
+  2  _/S        4  kernel running on an out of specification system
+  3  _/R        8  module was force unloaded
+  4  _/M       16  processor reported a Machine Check Exception (MCE)
+  5  _/B       32  bad page referenced or some unexpected page flags
+  6  _/U       64  taint requested by userspace application
+  7  _/D      128  kernel died recently, i.e. there was an OOPS or BUG
+  8  _/A      256  ACPI table overridden by user
+  9  _/W      512  kernel issued warning
+ 10  _/C     1024  staging driver was loaded
+ 11  _/I     2048  workaround for bug in platform firmware applied
+ 12  _/O     4096  externally-built ("out-of-tree") module was loaded
+ 13  _/E     8192  unsigned module was loaded
+ 14  _/L    16384  soft lockup occurred
+ 15  _/K    32768  kernel has been live patched
+ 16  _/X    65536  auxiliary taint, defined for and used by distros
+ 17  _/T   131072  kernel was built with the struct randomization plugin
+ 18  _/N   262144  an in-kernel test has been run
+ 19  _/J   524288  userspace used a mutating debug operation in fwctl
+ 20  _/Z  1048576  a driver was forced on a non-matching device
+===  ===  =======  ========================================================
 
 Note: The character ``_`` is representing a blank in this table to make reading
 easier.
@@ -189,3 +190,6 @@ More detailed explanation for tainting
  19) ``J`` if userspace opened /dev/fwctl/* and performed a FWTCL_RPC_DEBUG_WRITE
      to use the devices debugging features. Device debugging features could
      cause the device to malfunction in undefined ways.
+
+ 20) ``Z`` if a device was matched using the `driver_override` sysfs property
+     to a driver that didn't explicitly allow that.
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 396097fdb316..5344b20488fd 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -603,6 +603,56 @@ int bus_add_device(struct device *dev)
 	return error;
 }
 
+static bool __read_mostly allow_driver_override;
+
+static int __init allow_driver_override_setup(char *str)
+{
+	if (!str || kstrtobool(str, &allow_driver_override) < 0)
+		allow_driver_override = true;
+
+	return 1;
+}
+__setup("allow_driver_override=", allow_driver_override_setup);
+
+/**
+ * device_match_driver_override() - Match a driver against the device's driver_override.
+ * @dev: device to check
+ * @drv: driver to match against
+ *
+ * Returns > 0 if a driver override is set and matches the given driver, 0 if a
+ * driver override is set but does not match, or < 0 if a driver override is not
+ * set at all.
+ */
+int device_match_driver_override(struct device *dev,
+				 const struct device_driver *drv)
+{
+	guard(spinlock)(&dev->driver_override.lock);
+	if (dev->driver_override.name) {
+		int ret = !strcmp(dev->driver_override.name, drv->name);
+
+		if (ret > 0 && !drv->support_driver_override) {
+			if (allow_driver_override) {
+				add_taint_module(drv->owner,
+						 TAINT_DRIVER_OVERRIDE, LOCKDEP_STILL_OK);
+			} else {
+				/*
+				 * If you hit this warning and you need to
+				 * quickly workaround this check, boot with
+				 * allow_driver_override=1 on the kernel
+				 * commandline. The right fix is to set the
+				 * driver's .support_driver_override property.
+				 */
+				dev_warn(dev, "Suppressed driver override binding to %s.\n", drv->name);
+				return -1;
+			}
+		}
+
+		return ret;
+	}
+	return -1;
+}
+EXPORT_SYMBOL_GPL(device_match_driver_override);
+
 static void __bus_probe_device(struct device *dev)
 {
 	struct subsys_private *sp = bus_to_subsys(dev->bus);
diff --git a/include/linux/device.h b/include/linux/device.h
index 6b082c638d45..05413c1a9454 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -907,23 +907,8 @@ static inline bool device_has_driver_override(struct device *dev)
 	return !!dev->driver_override.name;
 }
 
-/**
- * device_match_driver_override() - Match a driver against the device's driver_override.
- * @dev: device to check
- * @drv: driver to match against
- *
- * Returns > 0 if a driver override is set and matches the given driver, 0 if a
- * driver override is set but does not match, or < 0 if a driver override is not
- * set at all.
- */
-static inline int device_match_driver_override(struct device *dev,
-					       const struct device_driver *drv)
-{
-	guard(spinlock)(&dev->driver_override.lock);
-	if (dev->driver_override.name)
-		return !strcmp(dev->driver_override.name, drv->name);
-	return -1;
-}
+int device_match_driver_override(struct device *dev,
+				 const struct device_driver *drv);
 
 /**
  * device_iommu_mapped - Returns true when the device DMA is translated
diff --git a/include/linux/device/driver.h b/include/linux/device/driver.h
index 29fbc01ef06f..0153cfcbe1b9 100644
--- a/include/linux/device/driver.h
+++ b/include/linux/device/driver.h
@@ -56,6 +56,7 @@ enum probe_type {
  * @bus:	The bus which the device of this driver belongs to.
  * @owner:	The module owner.
  * @mod_name:	Used for built-in modules.
+ * @support_driver_override: driver_override only works if this is true.
  * @suppress_bind_attrs: Disables bind/unbind via sysfs.
  * @probe_type:	Type of the probe (synchronous or asynchronous) to use.
  * @of_match_table: The open firmware table.
@@ -104,6 +105,7 @@ struct device_driver {
 	struct module		*owner;
 	const char		*mod_name;	/* used for built-in modules */
 
+	bool support_driver_override;
 	bool suppress_bind_attrs;	/* disables bind/unbind via sysfs */
 	enum probe_type probe_type;
 
diff --git a/include/linux/panic.h b/include/linux/panic.h
index 17e61b61c45f..009232511cc7 100644
--- a/include/linux/panic.h
+++ b/include/linux/panic.h
@@ -89,7 +89,8 @@ static inline void set_arch_panic_timeout(int timeout, int arch_default_timeout)
 #define TAINT_RANDSTRUCT		17
 #define TAINT_TEST			18
 #define TAINT_FWCTL			19
-#define TAINT_FLAGS_COUNT		20
+#define TAINT_DRIVER_OVERRIDE		20
+#define TAINT_FLAGS_COUNT		21
 #define TAINT_FLAGS_MAX			((1UL << TAINT_FLAGS_COUNT) - 1)
 
 struct taint_flag {
diff --git a/include/trace/events/module.h b/include/trace/events/module.h
index e5a006be9dc6..d54ce3c7572b 100644
--- a/include/trace/events/module.h
+++ b/include/trace/events/module.h
@@ -26,7 +26,8 @@ struct module;
 	{ (1UL << TAINT_OOT_MODULE),		"O" },		\
 	{ (1UL << TAINT_FORCED_MODULE),		"F" },		\
 	{ (1UL << TAINT_CRAP),			"C" },		\
-	{ (1UL << TAINT_UNSIGNED_MODULE),	"E" })
+	{ (1UL << TAINT_UNSIGNED_MODULE),	"E" },		\
+	{ (1UL << TAINT_DRIVER_OVERRIDE),	"Z" })
 
 TRACE_EVENT(module_load,
 
diff --git a/kernel/panic.c b/kernel/panic.c
index 91e48d33b7db..81ea9ef9afb0 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -825,6 +825,7 @@ const struct taint_flag taint_flags[TAINT_FLAGS_COUNT] = {
 	TAINT_FLAG(RANDSTRUCT,			'T', ' '),
 	TAINT_FLAG(TEST,			'N', ' '),
 	TAINT_FLAG(FWCTL,			'J', ' '),
+	TAINT_FLAG(DRIVER_OVERRIDE,		'Z', ' '),
 };
 
 #undef TAINT_FLAG
@@ -861,7 +862,7 @@ static void print_tainted_seq(struct seq_buf *s, bool verbose)
  * exact size is allocated dynamically; the initial buffer remains
  * as a fallback if allocation fails.
  *
- * The verbose taint string currently requires up to 327 characters.
+ * The verbose taint string currently requires up to 348 characters.
  */
 #define INIT_TAINT_BUF_MAX 350
 
diff --git a/tools/debugging/kernel-chktaint b/tools/debugging/kernel-chktaint
index e1571c04afb5..56215e0f5112 100755
--- a/tools/debugging/kernel-chktaint
+++ b/tools/debugging/kernel-chktaint
@@ -211,6 +211,15 @@ else
 	addout "J"
 	echo " * fwctl's mutating debug interface was used (#19)"
 fi
+
+T=`expr $T / 2`
+if [ `expr $T % 2` -eq 0 ]; then
+	addout " "
+else
+	addout "Z"
+	echo " * A device was matched using driver_override to a driver not supporting that (#20)"
+fi
+
 echo "Raw taint value as int/string: $taint/'$out'"
 
 # report on any tainted loadable modules

base-commit: 84abb955b1015477aa11a96e2f3ac1b938b77f48
-- 
2.56.0.rc1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [PATCH] driver core: Disable driver overriding by default
  2026-11-16 11:08 [PATCH] driver core: Disable driver overriding by default Uwe Kleine-König
@ 2026-11-16 11:36 ` sashiko-bot
  2026-11-16 15:48   ` Uwe Kleine-König
  2026-11-18  5:51 ` Michael Kelley
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 33+ messages in thread
From: sashiko-bot @ 2026-11-16 11:36 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-trace-kernel

Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [High] driver core: device_match_driver_override() returns -1 instead
  of 0
- [High] driver core: disabling driver_override by default breaks
  in-tree drivers
- [Low] driver core: allow_driver_override_setup() enables override on
  parse error
--

commit 06f24686a63b0776fbdf7d5d7bb34b7905ceba41
Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com>

driver core: Disable driver overriding by default

This commit disables driver_override matching unless a driver sets
support_driver_override or the allow_driver_override=1 boot parameter is
used, and adds TAINT_DRIVER_OVERRIDE when an unsupported override match is
allowed.

> diff --git a/drivers/base/bus.c b/drivers/base/bus.c
> index 396097fdb3162..5344b20488fde 100644
> --- a/drivers/base/bus.c
> +++ b/drivers/base/bus.c
> @@ -603,6 +603,56 @@ int bus_add_device(struct device *dev)
>  	return error;
>  }
>  
> +static bool __read_mostly allow_driver_override;
> +
> +static int __init allow_driver_override_setup(char *str)
> +{
> +	if (!str || kstrtobool(str, &allow_driver_override) < 0)
> +		allow_driver_override = true;
> +
> +	return 1;
> +}
> +__setup("allow_driver_override=", allow_driver_override_setup);

[Severity: Low]
Does allow_driver_override_setup() enable allow_driver_override when
kstrtobool() fails?  Passing an unrecognized argument such as
allow_driver_override=disabled or allow_driver_override= causes kstrtobool()
to return -EINVAL, setting allow_driver_override to true instead of keeping
it disabled.

> +
> +/**
> + * device_match_driver_override() - Match a driver against the device's driver_override.
> + * @dev: device to check
> + * @drv: driver to match against
> + *
> + * Returns > 0 if a driver override is set and matches the given driver, 0 if a
> + * driver override is set but does not match, or < 0 if a driver override is not
> + * set at all.
> + */
> +int device_match_driver_override(struct device *dev,
> +				 const struct device_driver *drv)
> +{
> +	guard(spinlock)(&dev->driver_override.lock);
> +	if (dev->driver_override.name) {
> +		int ret = !strcmp(dev->driver_override.name, drv->name);
> +
> +		if (ret > 0 && !drv->support_driver_override) {

[Severity: High]
Does rejecting driver_override by default before any in-tree driver sets
support_driver_override break in-kernel callers of
device_set_driver_override() and git bisectability?

Several subsystems call device_set_driver_override() internally to bind
kernel-created devices whose names or ID tables do not match via normal bus
matching.  For example, i2s_create_secondary_device() creates a "%s-sec"
platform device, sets its override to "samsung-i2s", and calls
device_attach():

sound/soc/samsung/i2s.c:i2s_create_secondary_device() {
	...
	ret = device_set_driver_override(&pdev_sec->dev, "samsung-i2s");
	...
	ret = device_attach(&pdev_sec->dev);
	if (ret <= 0) {
		platform_device_unregister(priv->pdev_sec);
		dev_info(&pdev_sec->dev, "device_attach() failed\n");
		return ret;
	}
	...
}

Because samsung_i2s_driver does not set support_driver_override,
platform_match() fails, device_attach() returns 0 while priv->pdev_sec is
still NULL (leaking pdev_sec), and samsung_i2s_probe() then dereferences
priv->pdev_sec.  Other internal users such as imx_clk_scu_alloc_dev() and
rpmsg_ns_register_device() also fail to bind their drivers at boot, and all
VFIO, UIO, and stub driver_override workflows are broken at this commit.

In addition, PCI and CDX drivers that use PCI_DRIVER_OVERRIDE_DEVICE_VFIO()
or CDX_DEVICE_DRIVER_OVERRIDE() rely on device_match_driver_override()
returning > 0 so do_pci_match_id() and cdx_bus_match() match override_only
ID table entries, whereas setting support_driver_override on those drivers
would also allow pci_match_device() to bind arbitrary non-matching devices
via pci_device_id_any without tainting.

> +			if (allow_driver_override) {
> +				add_taint_module(drv->owner,
> +						 TAINT_DRIVER_OVERRIDE, LOCKDEP_STILL_OK);
> +			} else {
> +				/*
> +				 * If you hit this warning and you need to
> +				 * quickly workaround this check, boot with
> +				 * allow_driver_override=1 on the kernel
> +				 * commandline. The right fix is to set the
> +				 * driver's .support_driver_override property.
> +				 */
> +				dev_warn(dev, "Suppressed driver override binding to %s.\n", drv->name);
> +				return -1;

[Severity: High]
Should device_match_driver_override() return 0 rather than -1 when
suppressing a match?

Per the function comment, < 0 means no driver_override is set at all, while
0 means an override is set but does not match drv.  Returning -1 for the
matching driver while returning 0 for all other drivers causes callers to
fall through to normal bus matching for the overridden driver:

drivers/vdpa/vdpa.c:vdpa_dev_match() {
	int ret;

	/* Check override first, and if set, only use the named driver */
	ret = device_match_driver_override(dev, drv);
	if (ret >= 0)
		return ret;

	/* Currently devices must be supported by all vDPA bus drivers */
	return 1;
}

On vDPA (and similarly in css_bus_match(), ap_device_probe(), and wildcard
PCI drivers), returning -1 logs that the override was suppressed, skips
TAINT_DRIVER_OVERRIDE, and still binds the device to the overridden driver.
And because device_match_driver_override() runs before normal bus matching,
setting driver_override to a driver that also matches the device natively
(such as in of_qcom_slim_ngd_register() or when rebinding a device to its
native driver) either logs a false suppression warning before binding anyway
or taints the kernel with TAINT_DRIVER_OVERRIDE.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261116110853.3418077-2-u.kleine-koenig@baylibre.com?part=1

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] driver core: Disable driver overriding by default
  2026-11-16 11:36 ` sashiko-bot
@ 2026-11-16 15:48   ` Uwe Kleine-König
  0 siblings, 0 replies; 33+ messages in thread
From: Uwe Kleine-König @ 2026-11-16 15:48 UTC (permalink / raw)
  To: sashiko-reviews, Greg Kroah-Hartman; +Cc: linux-trace-kernel

[-- Attachment #1: Type: text/plain, Size: 6951 bytes --]

Hello,

On Mon, Nov 16, 2026 at 11:36:25AM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 3 potential
> issues to consider:
> - [High] driver core: device_match_driver_override() returns -1 instead
>   of 0
> - [High] driver core: disabling driver_override by default breaks
>   in-tree drivers
> - [Low] driver core: allow_driver_override_setup() enables override on
>   parse error
> --
> 
> commit 06f24686a63b0776fbdf7d5d7bb34b7905ceba41
> Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> 
> driver core: Disable driver overriding by default
> 
> This commit disables driver_override matching unless a driver sets
> support_driver_override or the allow_driver_override=1 boot parameter is
> used, and adds TAINT_DRIVER_OVERRIDE when an unsupported override match is
> allowed.
> 
> > diff --git a/drivers/base/bus.c b/drivers/base/bus.c
> > index 396097fdb3162..5344b20488fde 100644
> > --- a/drivers/base/bus.c
> > +++ b/drivers/base/bus.c
> > @@ -603,6 +603,56 @@ int bus_add_device(struct device *dev)
> >  	return error;
> >  }
> >  
> > +static bool __read_mostly allow_driver_override;
> > +
> > +static int __init allow_driver_override_setup(char *str)
> > +{
> > +	if (!str || kstrtobool(str, &allow_driver_override) < 0)
> > +		allow_driver_override = true;
> > +
> > +	return 1;
> > +}
> > +__setup("allow_driver_override=", allow_driver_override_setup);
> 
> [Severity: Low]
> Does allow_driver_override_setup() enable allow_driver_override when
> kstrtobool() fails?  Passing an unrecognized argument such as
> allow_driver_override=disabled or allow_driver_override= causes kstrtobool()
> to return -EINVAL, setting allow_driver_override to true instead of keeping
> it disabled.

I think that's fine. The expected thing happens for

	allow_driver_override=1
	allow_driver_override=y
	allow_driver_override=Y
	allow_driver_override=oN

	allow_driver_override=0
	allow_driver_override=n
	allow_driver_override=N
	allow_driver_override=oFf

and that

	allow_driver_override=disabled

and also

	allow_driver_override=Thursday

also enables that override mode is IMHO ok. The documentation only
mentions =1, so I think that's good enough.
	
> > +
> > +/**
> > + * device_match_driver_override() - Match a driver against the device's driver_override.
> > + * @dev: device to check
> > + * @drv: driver to match against
> > + *
> > + * Returns > 0 if a driver override is set and matches the given driver, 0 if a
> > + * driver override is set but does not match, or < 0 if a driver override is not
> > + * set at all.
> > + */
> > +int device_match_driver_override(struct device *dev,
> > +				 const struct device_driver *drv)
> > +{
> > +	guard(spinlock)(&dev->driver_override.lock);
> > +	if (dev->driver_override.name) {
> > +		int ret = !strcmp(dev->driver_override.name, drv->name);
> > +
> > +		if (ret > 0 && !drv->support_driver_override) {
> 
> [Severity: High]
> Does rejecting driver_override by default before any in-tree driver sets
> support_driver_override break in-kernel callers of
> device_set_driver_override() and git bisectability?

It breaks some intended use, yes, and I mentioned in the comment area
after the commit log that a followup is needed for some drivers. IMHO
it's not a big desaster if we miss one or the other, because there is
the kernel cmdline parameter that allows to restore the old behaviour
and catching up is easy.

> Several subsystems call device_set_driver_override() internally to bind
> kernel-created devices whose names or ID tables do not match via normal bus
> matching.  For example, i2s_create_secondary_device() creates a "%s-sec"
> platform device, sets its override to "samsung-i2s", and calls
> device_attach():
> 
> sound/soc/samsung/i2s.c:i2s_create_secondary_device() {
> 	...
> 	ret = device_set_driver_override(&pdev_sec->dev, "samsung-i2s");
> 	...
> 	ret = device_attach(&pdev_sec->dev);
> 	if (ret <= 0) {
> 		platform_device_unregister(priv->pdev_sec);
> 		dev_info(&pdev_sec->dev, "device_attach() failed\n");
> 		return ret;
> 	}
> 	...

OK, so samsung_i2s_driver in sound/soc/samsung/i2s.c needs this flag
set, too. Similar:

	imx_clk_scu_driver in drivers/clk/imx/clk-scu.c
	rpmsg_ctrldev_driver in drivers/rpmsg/rpmsg_ctrl.c
	rpmsg_ns_driver in drivers/rpmsg/rpmsg_ns.c
	qcom_slim_ngd_driver in drivers/slimbus/qcom-ngd-ctrl.c
	vfio_fsl_mc_driver in drivers/vfio/fsl-mc/vfio_fsl_mc.c

> }
> 
> Because samsung_i2s_driver does not set support_driver_override,
> platform_match() fails, device_attach() returns 0 while priv->pdev_sec is
> still NULL (leaking pdev_sec), and samsung_i2s_probe() then dereferences
> priv->pdev_sec.  Other internal users such as imx_clk_scu_alloc_dev() and
> rpmsg_ns_register_device() also fail to bind their drivers at boot, and all
> VFIO, UIO, and stub driver_override workflows are broken at this commit.
> 
> In addition, PCI and CDX drivers that use PCI_DRIVER_OVERRIDE_DEVICE_VFIO()
> or CDX_DEVICE_DRIVER_OVERRIDE() rely on device_match_driver_override()
> returning > 0 so do_pci_match_id() and cdx_bus_match() match override_only
> ID table entries, whereas setting support_driver_override on those drivers
> would also allow pci_match_device() to bind arbitrary non-matching devices
> via pci_device_id_any without tainting.

I didn't completely understood that. I think this is remedied by
changing the return -1 that is criticised in the severity high issue
below to 0.

> > +			if (allow_driver_override) {
> > +				add_taint_module(drv->owner,
> > +						 TAINT_DRIVER_OVERRIDE, LOCKDEP_STILL_OK);
> > +			} else {
> > +				/*
> > +				 * If you hit this warning and you need to
> > +				 * quickly workaround this check, boot with
> > +				 * allow_driver_override=1 on the kernel
> > +				 * commandline. The right fix is to set the
> > +				 * driver's .support_driver_override property.
> > +				 */
> > +				dev_warn(dev, "Suppressed driver override binding to %s.\n", drv->name);
> > +				return -1;
> 
> [Severity: High]
> Should device_match_driver_override() return 0 rather than -1 when
> suppressing a match?
> 
> Per the function comment, < 0 means no driver_override is set at all, while
> 0 means an override is set but does not match drv.  Returning -1 for the
> matching driver while returning 0 for all other drivers causes callers to
> fall through to normal bus matching for the overridden driver:
> 
> drivers/vdpa/vdpa.c:vdpa_dev_match() {
> 	int ret;
> 
> 	/* Check override first, and if set, only use the named driver */
> 	ret = device_match_driver_override(dev, drv);
> 	if (ret >= 0)
> 		return ret;
> 
> 	/* Currently devices must be supported by all vDPA bus drivers */
> 	return 1;
> }

indeed, returning 0 is more sensible.

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 33+ messages in thread

* RE: [PATCH] driver core: Disable driver overriding by default
  2026-11-16 11:08 [PATCH] driver core: Disable driver overriding by default Uwe Kleine-König
  2026-11-16 11:36 ` sashiko-bot
@ 2026-11-18  5:51 ` Michael Kelley
  2026-11-18  7:43   ` Uwe Kleine-König
  2026-11-18 16:04 ` Bradley Morgan
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 33+ messages in thread
From: Michael Kelley @ 2026-11-18  5:51 UTC (permalink / raw)
  To: Uwe Kleine-König, Greg Kroah-Hartman
  Cc: Jonathan Corbet, Shuah Khan, Randy Dunlap, Rafael J. Wysocki,
	Danilo Krummrich, Johan Hovold, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, David Lechner, Armin Wolf, Thierry Reding,
	Mike Rapoport (Microsoft), Arnd Bergmann, Karl Mehltretter,
	Paul E. McKenney, Borislav Petkov (AMD), Dapeng Mi, Marco Elver,
	Ethan Nelson-Moore, Jeff Layton, Bradley Morgan, Andrew Morton,
	Petr Mladek, Pnina Feder, Mete Durlu, Aaron Tomlin, Rio,
	Feng Tang, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, driver-core@lists.linux.dev,
	linux-trace-kernel@vger.kernel.org, Mark Brown, Bjorn Helgaas,
	Alex Williamson

From: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Sent: Monday, November 16, 2026 3:09 AM
> 
> Driver overriding is useful only in a very limited set of situations
> and then only with very few drivers that are designed to support that.
> 
> Disallow matching via driver_override unless the driver explicitly
> allows it or the safe guard is disabled using the
> "allow_driver_override=1" kernel parameter.
> 
> There are many drivers that don't expect to be force-bound and often
> doing it anyhow results in a NULL pointer exception. To make debugging
> such cases easier, add a new taint if such a forced match happens.

As noted by Alex Williamson [1], there's also the new_id mechanism
that can force bogus matches and result in the same kind of NULL
pointer exceptions. What's your thinking about covering that case
as well?

[1] https://lore.kernel.org/lkml/20261028094139.12ea7c16@shazbot.org/

> 
> Implementation detail: device_match_driver_override() isn't a static
> inline any more. It grew a certain complexity (e.g. a pr_info()) and so
> was made a regular exported function.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> ---
> Hello,
> 
> this is a rebase to current next of the series
> https://lore.kernel.org/all/cover.1790612298.git.u.kleine-koenig@baylibre.com/
> . It combines the functionality of former patches #2 and #3 (#1 was a
> fix that was already applied). I also addressed sashiko's comments. I think
> this matches what most people want in the previous discussion.
> 
> As the rebase wasn't trivial and I merged the two patches, I didn't
> apply the review tags I already received for v3.
> 
> If this patch is accepted, a number of drivers that are supposed to be
> force-bound need to get their .support_driver_override property set. I'm
> aware of the following:
> 
>  - spidev_spi_driver in drivers/spi/spidev.c
>  - stub_driver in drivers/pci/pci-stub.c
>  - uio_dmem_genirq in drivers/uio/uio_dmem_genirq.c
>  - uio_pci_driver in drivers/uio/uio_pci_generic.c
>  - uio_pdrv_genirq in drivers/uio/uio_pdrv_genirq.c
>  - vfio_amba_driver in drivers/vfio/platform/vfio_amba.c
>  - vfio_ccw_sch_driver in drivers/s390/cio/vfio_ccw_drv.c
>  - vfio_pci_driver in drivers/vfio/pci/vfio_pci.c
>  - vfio_platform_driver in drivers/vfio/platform/vfio_platform.c

drivers/uio/uio_hv_generic.c also probably needs to be in this list.
It's used for running DPDK against the Hyper-V VMBus synthetic
NIC device.

> 
> This is not needed for the userspace i2c driver.
> 
> As the flag to set is only introduced in this patch and assuming this
> patch is accepted, I suggest to create an immutable branch for it to
> allow setting the needed flags in driver trees. Alternatively let all
> these go together via a single tree or branch.
> 
> Best regards
> Uwe
> 
>  .../admin-guide/kernel-parameters.txt         |  6 +++
>  Documentation/admin-guide/tainted-kernels.rst | 54 ++++++++++---------
>  drivers/base/bus.c                            | 50 +++++++++++++++++
>  include/linux/device.h                        | 19 +------
>  include/linux/device/driver.h                 |  2 +
>  include/linux/panic.h                         |  3 +-
>  include/trace/events/module.h                 |  3 +-
>  kernel/panic.c                                |  3 +-
>  tools/debugging/kernel-chktaint               |  9 ++++
>  9 files changed, 104 insertions(+), 45 deletions(-)
> 
> diff --git a/Documentation/admin-guide/kernel-parameters.txt
> b/Documentation/admin-guide/kernel-parameters.txt
> index 85804cfe7ef6..aabc97feef9b 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -424,6 +424,12 @@ Kernel parameters
>  			do not want to use tracing_snapshot_alloc() as it needs
>  			to be done where GFP_KERNEL allocations are allowed.
> 
> +	allow_driver_override=
> +			When set to 1 allow matching drivers without
> +			.support_driver_override = true to devices using
> +			driver_override. This is a dangerous operation in
> +			general allowing root to oops the kernel.
> +
>  	allow_mismatched_32bit_el0 [ARM64,EARLY]
>  			Allow execve() of 32-bit applications and setting of the
>  			PER_LINUX32 personality on systems where only a strict
> diff --git a/Documentation/admin-guide/tainted-kernels.rst b/Documentation/admin-
> guide/tainted-kernels.rst
> index fcb8b9734548..e6bab575ccef 100644
> --- a/Documentation/admin-guide/tainted-kernels.rst
> +++ b/Documentation/admin-guide/tainted-kernels.rst
> @@ -74,35 +74,36 @@ a particular type of taint. It's best to leave that to the
> aforementioned
>  script, but if you need something quick you can use this shell command to check
>  which bits are set::
> 
> -	$ for i in $(seq 0 19); do echo $i $(($(cat
> /proc/sys/kernel/tainted)>>$i&1));done
> +	$ for i in $(seq 0 20); do echo $i $(($(cat
> /proc/sys/kernel/tainted)>>$i&1));done
> 
>  Table for decoding tainted state
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> -===  ===  ======  ========================================================
> -Bit  Log  Number  Reason that got the kernel tainted
> -===  ===  ======  ========================================================
> -  0  G/P       1  proprietary module was loaded
> -  1  _/F       2  module was force loaded
> -  2  _/S       4  kernel running on an out of specification system
> -  3  _/R       8  module was force unloaded
> -  4  _/M      16  processor reported a Machine Check Exception (MCE)
> -  5  _/B      32  bad page referenced or some unexpected page flags
> -  6  _/U      64  taint requested by userspace application
> -  7  _/D     128  kernel died recently, i.e. there was an OOPS or BUG
> -  8  _/A     256  ACPI table overridden by user
> -  9  _/W     512  kernel issued warning
> - 10  _/C    1024  staging driver was loaded
> - 11  _/I    2048  workaround for bug in platform firmware applied
> - 12  _/O    4096  externally-built ("out-of-tree") module was loaded
> - 13  _/E    8192  unsigned module was loaded
> - 14  _/L   16384  soft lockup occurred
> - 15  _/K   32768  kernel has been live patched
> - 16  _/X   65536  auxiliary taint, defined for and used by distros
> - 17  _/T  131072  kernel was built with the struct randomization plugin
> - 18  _/N  262144  an in-kernel test has been run
> - 19  _/J  524288  userspace used a mutating debug operation in fwctl
> -===  ===  ======  ========================================================
> +===  ===  =======  ========================================================
> +Bit  Log   Number  Reason that got the kernel tainted
> +===  ===  =======  ========================================================
> +  0  G/P        1  proprietary module was loaded
> +  1  _/F        2  module was force loaded
> +  2  _/S        4  kernel running on an out of specification system
> +  3  _/R        8  module was force unloaded
> +  4  _/M       16  processor reported a Machine Check Exception (MCE)
> +  5  _/B       32  bad page referenced or some unexpected page flags
> +  6  _/U       64  taint requested by userspace application
> +  7  _/D      128  kernel died recently, i.e. there was an OOPS or BUG
> +  8  _/A      256  ACPI table overridden by user
> +  9  _/W      512  kernel issued warning
> + 10  _/C     1024  staging driver was loaded
> + 11  _/I     2048  workaround for bug in platform firmware applied
> + 12  _/O     4096  externally-built ("out-of-tree") module was loaded
> + 13  _/E     8192  unsigned module was loaded
> + 14  _/L    16384  soft lockup occurred
> + 15  _/K    32768  kernel has been live patched
> + 16  _/X    65536  auxiliary taint, defined for and used by distros
> + 17  _/T   131072  kernel was built with the struct randomization plugin
> + 18  _/N   262144  an in-kernel test has been run
> + 19  _/J   524288  userspace used a mutating debug operation in fwctl
> + 20  _/Z  1048576  a driver was forced on a non-matching device
> +===  ===  =======  ========================================================
> 
>  Note: The character ``_`` is representing a blank in this table to make reading
>  easier.
> @@ -189,3 +190,6 @@ More detailed explanation for tainting
>   19) ``J`` if userspace opened /dev/fwctl/* and performed a FWTCL_RPC_DEBUG_WRITE
>       to use the devices debugging features. Device debugging features could
>       cause the device to malfunction in undefined ways.
> +
> + 20) ``Z`` if a device was matched using the `driver_override` sysfs property
> +     to a driver that didn't explicitly allow that.
> diff --git a/drivers/base/bus.c b/drivers/base/bus.c
> index 396097fdb316..5344b20488fd 100644
> --- a/drivers/base/bus.c
> +++ b/drivers/base/bus.c
> @@ -603,6 +603,56 @@ int bus_add_device(struct device *dev)
>  	return error;
>  }
> 
> +static bool __read_mostly allow_driver_override;
> +
> +static int __init allow_driver_override_setup(char *str)
> +{
> +	if (!str || kstrtobool(str, &allow_driver_override) < 0)

If the kernel boot line parameter has a bogus value that doesn't
map to "true" or "false", kstrtobool returns -EINVAL and
allow_driver_override is set to true. Seems like a bogus value
should default to false. If no value at all is supplied and str
is NULL, it's debatable as to whether defaulting to true is OK.
Seems like might want to insist on a value that indicates
"true".

> +		allow_driver_override = true;
> +
> +	return 1;
> +}
> +__setup("allow_driver_override=", allow_driver_override_setup);
> +
> +/**
> + * device_match_driver_override() - Match a driver against the device's driver_override.
> + * @dev: device to check
> + * @drv: driver to match against
> + *
> + * Returns > 0 if a driver override is set and matches the given driver, 0 if a
> + * driver override is set but does not match, or < 0 if a driver override is not
> + * set at all.

Additionally, returns < 0 if a matching override exists but is disallowed.

> + */
> +int device_match_driver_override(struct device *dev,
> +				 const struct device_driver *drv)
> +{
> +	guard(spinlock)(&dev->driver_override.lock);
> +	if (dev->driver_override.name) {
> +		int ret = !strcmp(dev->driver_override.name, drv->name);
> +
> +		if (ret > 0 && !drv->support_driver_override) {

Using "ret > 0" seems a bit odd since the value is essentially Boolean.
Suggest using just "ret".

> +			if (allow_driver_override) {
> +				add_taint_module(drv->owner,
> +						 TAINT_DRIVER_OVERRIDE, LOCKDEP_STILL_OK);
> +			} else {
> +				/*
> +				 * If you hit this warning and you need to
> +				 * quickly workaround this check, boot with
> +				 * allow_driver_override=1 on the kernel
> +				 * commandline. The right fix is to set the
> +				 * driver's .support_driver_override property.
> +				 */
> +				dev_warn(dev, "Suppressed driver override binding to %s.\n", drv->name);

Maybe "Disallowed" instead of "Suppressed" in the message? Even better,
could the name of the device be provided? For example,

"Disallowed bind of driver %s to device %s using driver override"
 
> +				return -1;
> +			}
> +		}
> +
> +		return ret;
> +	}
> +	return -1;
> +}
> +EXPORT_SYMBOL_GPL(device_match_driver_override);
> +
>  static void __bus_probe_device(struct device *dev)
>  {
>  	struct subsys_private *sp = bus_to_subsys(dev->bus);
> diff --git a/include/linux/device.h b/include/linux/device.h
> index 6b082c638d45..05413c1a9454 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -907,23 +907,8 @@ static inline bool device_has_driver_override(struct device *dev)
>  	return !!dev->driver_override.name;
>  }
> 
> -/**
> - * device_match_driver_override() - Match a driver against the device's driver_override.
> - * @dev: device to check
> - * @drv: driver to match against
> - *
> - * Returns > 0 if a driver override is set and matches the given driver, 0 if a
> - * driver override is set but does not match, or < 0 if a driver override is not
> - * set at all.
> - */
> -static inline int device_match_driver_override(struct device *dev,
> -					       const struct device_driver *drv)
> -{
> -	guard(spinlock)(&dev->driver_override.lock);
> -	if (dev->driver_override.name)
> -		return !strcmp(dev->driver_override.name, drv->name);
> -	return -1;
> -}
> +int device_match_driver_override(struct device *dev,
> +				 const struct device_driver *drv);
> 
>  /**
>   * device_iommu_mapped - Returns true when the device DMA is translated
> diff --git a/include/linux/device/driver.h b/include/linux/device/driver.h
> index 29fbc01ef06f..0153cfcbe1b9 100644
> --- a/include/linux/device/driver.h
> +++ b/include/linux/device/driver.h
> @@ -56,6 +56,7 @@ enum probe_type {
>   * @bus:	The bus which the device of this driver belongs to.
>   * @owner:	The module owner.
>   * @mod_name:	Used for built-in modules.
> + * @support_driver_override: driver_override only works if this is true.
>   * @suppress_bind_attrs: Disables bind/unbind via sysfs.
>   * @probe_type:	Type of the probe (synchronous or asynchronous) to use.
>   * @of_match_table: The open firmware table.
> @@ -104,6 +105,7 @@ struct device_driver {
>  	struct module		*owner;
>  	const char		*mod_name;	/* used for built-in modules */
> 
> +	bool support_driver_override;
>  	bool suppress_bind_attrs;	/* disables bind/unbind via sysfs */
>  	enum probe_type probe_type;
> 
> diff --git a/include/linux/panic.h b/include/linux/panic.h
> index 17e61b61c45f..009232511cc7 100644
> --- a/include/linux/panic.h
> +++ b/include/linux/panic.h
> @@ -89,7 +89,8 @@ static inline void set_arch_panic_timeout(int timeout, int
> arch_default_timeout)
>  #define TAINT_RANDSTRUCT		17
>  #define TAINT_TEST			18
>  #define TAINT_FWCTL			19
> -#define TAINT_FLAGS_COUNT		20
> +#define TAINT_DRIVER_OVERRIDE		20
> +#define TAINT_FLAGS_COUNT		21
>  #define TAINT_FLAGS_MAX			((1UL << TAINT_FLAGS_COUNT) - 1)
> 
>  struct taint_flag {
> diff --git a/include/trace/events/module.h b/include/trace/events/module.h
> index e5a006be9dc6..d54ce3c7572b 100644
> --- a/include/trace/events/module.h
> +++ b/include/trace/events/module.h
> @@ -26,7 +26,8 @@ struct module;
>  	{ (1UL << TAINT_OOT_MODULE),		"O" },		\
>  	{ (1UL << TAINT_FORCED_MODULE),		"F" },		\
>  	{ (1UL << TAINT_CRAP),			"C" },		\
> -	{ (1UL << TAINT_UNSIGNED_MODULE),	"E" })
> +	{ (1UL << TAINT_UNSIGNED_MODULE),	"E" },		\
> +	{ (1UL << TAINT_DRIVER_OVERRIDE),	"Z" })
> 
>  TRACE_EVENT(module_load,
> 
> diff --git a/kernel/panic.c b/kernel/panic.c
> index 91e48d33b7db..81ea9ef9afb0 100644
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -825,6 +825,7 @@ const struct taint_flag taint_flags[TAINT_FLAGS_COUNT] = {
>  	TAINT_FLAG(RANDSTRUCT,			'T', ' '),
>  	TAINT_FLAG(TEST,			'N', ' '),
>  	TAINT_FLAG(FWCTL,			'J', ' '),
> +	TAINT_FLAG(DRIVER_OVERRIDE,		'Z', ' '),
>  };
> 
>  #undef TAINT_FLAG
> @@ -861,7 +862,7 @@ static void print_tainted_seq(struct seq_buf *s, bool verbose)
>   * exact size is allocated dynamically; the initial buffer remains
>   * as a fallback if allocation fails.
>   *
> - * The verbose taint string currently requires up to 327 characters.
> + * The verbose taint string currently requires up to 348 characters.
>   */
>  #define INIT_TAINT_BUF_MAX 350
> 
> diff --git a/tools/debugging/kernel-chktaint b/tools/debugging/kernel-chktaint
> index e1571c04afb5..56215e0f5112 100755
> --- a/tools/debugging/kernel-chktaint
> +++ b/tools/debugging/kernel-chktaint
> @@ -211,6 +211,15 @@ else
>  	addout "J"
>  	echo " * fwctl's mutating debug interface was used (#19)"
>  fi
> +
> +T=`expr $T / 2`
> +if [ `expr $T % 2` -eq 0 ]; then
> +	addout " "
> +else
> +	addout "Z"
> +	echo " * A device was matched using driver_override to a driver not supporting that (#20)"

The messages in kernel-chktaint usually word-for-word match the text
in Documentation/admin-guide/tainted-kernels.rst. Any reason not to
do the same for this one?

Michael

> +fi
> +
>  echo "Raw taint value as int/string: $taint/'$out'"
> 
>  # report on any tainted loadable modules
> 
> base-commit: 84abb955b1015477aa11a96e2f3ac1b938b77f48
> --
> 2.56.0.rc1
> 


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] driver core: Disable driver overriding by default
  2026-11-18  5:51 ` Michael Kelley
@ 2026-11-18  7:43   ` Uwe Kleine-König
  2026-11-18 15:45     ` Michael Kelley
  0 siblings, 1 reply; 33+ messages in thread
From: Uwe Kleine-König @ 2026-11-18  7:43 UTC (permalink / raw)
  To: Michael Kelley
  Cc: Greg Kroah-Hartman, Jonathan Corbet, Shuah Khan, Randy Dunlap,
	Rafael J. Wysocki, Danilo Krummrich, Johan Hovold, Steven Rostedt,
	Masami Hiramatsu, Mathieu Desnoyers, David Lechner, Armin Wolf,
	Thierry Reding, Mike Rapoport (Microsoft), Arnd Bergmann,
	Karl Mehltretter, Paul E. McKenney, Borislav Petkov (AMD),
	Dapeng Mi, Marco Elver, Ethan Nelson-Moore, Jeff Layton,
	Bradley Morgan, Andrew Morton, Petr Mladek, Pnina Feder,
	Mete Durlu, Aaron Tomlin, Rio, Feng Tang,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	driver-core@lists.linux.dev, linux-trace-kernel@vger.kernel.org,
	Mark Brown, Bjorn Helgaas, Alex Williamson

[-- Attachment #1: Type: text/plain, Size: 6806 bytes --]

On Wed, Nov 18, 2026 at 05:51:29AM +0000, Michael Kelley wrote:
> From: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Sent: Monday, November 16, 2026 3:09 AM
> > 
> > Driver overriding is useful only in a very limited set of situations
> > and then only with very few drivers that are designed to support that.
> > 
> > Disallow matching via driver_override unless the driver explicitly
> > allows it or the safe guard is disabled using the
> > "allow_driver_override=1" kernel parameter.
> > 
> > There are many drivers that don't expect to be force-bound and often
> > doing it anyhow results in a NULL pointer exception. To make debugging
> > such cases easier, add a new taint if such a forced match happens.
> 
> As noted by Alex Williamson [1], there's also the new_id mechanism
> that can force bogus matches and result in the same kind of NULL
> pointer exceptions. What's your thinking about covering that case
> as well?
> 
> [1] https://lore.kernel.org/lkml/20261028094139.12ea7c16@shazbot.org/

I didn't look into pci's new_id a lot. It sounds as if it should also be
guarded with a similar mechanism as the one from this patch for
driver_override. As my experience and testing capability with PCI is
limited, I'd not add it to this effort, but leave it for someone in a
better position than me.

> > Implementation detail: device_match_driver_override() isn't a static
> > inline any more. It grew a certain complexity (e.g. a pr_info()) and so
> > was made a regular exported function.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> > ---
> > Hello,
> > 
> > this is a rebase to current next of the series
> > https://lore.kernel.org/all/cover.1790612298.git.u.kleine-koenig@baylibre.com/
> > . It combines the functionality of former patches #2 and #3 (#1 was a
> > fix that was already applied). I also addressed sashiko's comments. I think
> > this matches what most people want in the previous discussion.
> > 
> > As the rebase wasn't trivial and I merged the two patches, I didn't
> > apply the review tags I already received for v3.
> > 
> > If this patch is accepted, a number of drivers that are supposed to be
> > force-bound need to get their .support_driver_override property set. I'm
> > aware of the following:
> > 
> >  - spidev_spi_driver in drivers/spi/spidev.c
> >  - stub_driver in drivers/pci/pci-stub.c
> >  - uio_dmem_genirq in drivers/uio/uio_dmem_genirq.c
> >  - uio_pci_driver in drivers/uio/uio_pci_generic.c
> >  - uio_pdrv_genirq in drivers/uio/uio_pdrv_genirq.c
> >  - vfio_amba_driver in drivers/vfio/platform/vfio_amba.c
> >  - vfio_ccw_sch_driver in drivers/s390/cio/vfio_ccw_drv.c
> >  - vfio_pci_driver in drivers/vfio/pci/vfio_pci.c
> >  - vfio_platform_driver in drivers/vfio/platform/vfio_platform.c
> 
> drivers/uio/uio_hv_generic.c also probably needs to be in this list.
> It's used for running DPDK against the Hyper-V VMBus synthetic
> NIC device.

Noted.

> [...]
> > +static bool __read_mostly allow_driver_override;
> > +
> > +static int __init allow_driver_override_setup(char *str)
> > +{
> > +	if (!str || kstrtobool(str, &allow_driver_override) < 0)
> 
> If the kernel boot line parameter has a bogus value that doesn't
> map to "true" or "false", kstrtobool returns -EINVAL and
> allow_driver_override is set to true. Seems like a bogus value
> should default to false. If no value at all is supplied and str
> is NULL, it's debatable as to whether defaulting to true is OK.
> Seems like might want to insist on a value that indicates
> "true".

Well, the default without passing allow_driver_override=$anything is
false. Initially I wanted to have just

	allow_driver_override

on the commandline to disable the safe-guard but sashiko wailed about it
(well, more about how I implemented it). Maybe I'm going back to that
approach.

> > +		allow_driver_override = true;
> > +
> > +	return 1;
> > +}
> > +__setup("allow_driver_override=", allow_driver_override_setup);
> > +
> > +/**
> > + * device_match_driver_override() - Match a driver against the device's driver_override.
> > + * @dev: device to check
> > + * @drv: driver to match against
> > + *
> > + * Returns > 0 if a driver override is set and matches the given driver, 0 if a
> > + * driver override is set but does not match, or < 0 if a driver override is not
> > + * set at all.
> 
> Additionally, returns < 0 if a matching override exists but is disallowed.

Yeah, that comment is just taken unmodified from the old location of
device_match_driver_override(). Indeed needs adaption.
 
> > + */
> > +int device_match_driver_override(struct device *dev,
> > +				 const struct device_driver *drv)
> > +{
> > +	guard(spinlock)(&dev->driver_override.lock);
> > +	if (dev->driver_override.name) {
> > +		int ret = !strcmp(dev->driver_override.name, drv->name);
> > +
> > +		if (ret > 0 && !drv->support_driver_override) {
> 
> Using "ret > 0" seems a bit odd since the value is essentially Boolean.
> Suggest using just "ret".

ok

> > +			if (allow_driver_override) {
> > +				add_taint_module(drv->owner,
> > +						 TAINT_DRIVER_OVERRIDE, LOCKDEP_STILL_OK);
> > +			} else {
> > +				/*
> > +				 * If you hit this warning and you need to
> > +				 * quickly workaround this check, boot with
> > +				 * allow_driver_override=1 on the kernel
> > +				 * commandline. The right fix is to set the
> > +				 * driver's .support_driver_override property.
> > +				 */
> > +				dev_warn(dev, "Suppressed driver override binding to %s.\n", drv->name);
> 
> Maybe "Disallowed" instead of "Suppressed" in the message? Even better,
> could the name of the device be provided? For example,
> 
> "Disallowed bind of driver %s to device %s using driver override"

dev_warn() emits the device name.

> [...]
> > diff --git a/tools/debugging/kernel-chktaint b/tools/debugging/kernel-chktaint
> > index e1571c04afb5..56215e0f5112 100755
> > --- a/tools/debugging/kernel-chktaint
> > +++ b/tools/debugging/kernel-chktaint
> > @@ -211,6 +211,15 @@ else
> >  	addout "J"
> >  	echo " * fwctl's mutating debug interface was used (#19)"
> >  fi
> > +
> > +T=`expr $T / 2`
> > +if [ `expr $T % 2` -eq 0 ]; then
> > +	addout " "
> > +else
> > +	addout "Z"
> > +	echo " * A device was matched using driver_override to a driver not supporting that (#20)"
> 
> The messages in kernel-chktaint usually word-for-word match the text
> in Documentation/admin-guide/tainted-kernels.rst. Any reason not to
> do the same for this one?

no, will adapt.

> > +fi
> > +
> >  echo "Raw taint value as int/string: $taint/'$out'"
> > 
> >  # report on any tainted loadable modules

Thanks for the feedback.

Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 33+ messages in thread

* RE: [PATCH] driver core: Disable driver overriding by default
  2026-11-18  7:43   ` Uwe Kleine-König
@ 2026-11-18 15:45     ` Michael Kelley
  0 siblings, 0 replies; 33+ messages in thread
From: Michael Kelley @ 2026-11-18 15:45 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Greg Kroah-Hartman, Jonathan Corbet, Shuah Khan, Randy Dunlap,
	Rafael J. Wysocki, Danilo Krummrich, Johan Hovold, Steven Rostedt,
	Masami Hiramatsu, Mathieu Desnoyers, David Lechner, Armin Wolf,
	Thierry Reding, Mike Rapoport (Microsoft), Arnd Bergmann,
	Karl Mehltretter, Paul E. McKenney, Borislav Petkov (AMD),
	Dapeng Mi, Marco Elver, Ethan Nelson-Moore, Jeff Layton,
	Bradley Morgan, Andrew Morton, Petr Mladek, Pnina Feder,
	Mete Durlu, Aaron Tomlin, Rio, Feng Tang,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	driver-core@lists.linux.dev, linux-trace-kernel@vger.kernel.org,
	Mark Brown, Bjorn Helgaas, Alex Williamson

From: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Sent: Tuesday, November 17, 2026 11:44 PM
> 
> On Wed, Nov 18, 2026 at 05:51:29AM +0000, Michael Kelley wrote:
> > From: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Sent: Monday, November 16, 2026 3:09 AM

[snip]

> > > +/**
> > > + * device_match_driver_override() - Match a driver against the device's driver_override.
> > > + * @dev: device to check
> > > + * @drv: driver to match against
> > > + *
> > > + * Returns > 0 if a driver override is set and matches the given driver, 0 if a
> > > + * driver override is set but does not match, or < 0 if a driver override is not
> > > + * set at all.
> >
> > Additionally, returns < 0 if a matching override exists but is disallowed.
> 
> Yeah, that comment is just taken unmodified from the old location of
> device_match_driver_override(). Indeed needs adaption.
> 
> > > + */
> > > +int device_match_driver_override(struct device *dev,
> > > +				 const struct device_driver *drv)
> > > +{
> > > +	guard(spinlock)(&dev->driver_override.lock);
> > > +	if (dev->driver_override.name) {
> > > +		int ret = !strcmp(dev->driver_override.name, drv->name);
> > > +
> > > +		if (ret > 0 && !drv->support_driver_override) {
> >
> > Using "ret > 0" seems a bit odd since the value is essentially Boolean.
> > Suggest using just "ret".
> 
> ok
> 
> > > +			if (allow_driver_override) {
> > > +				add_taint_module(drv->owner,
> > > +						 TAINT_DRIVER_OVERRIDE, LOCKDEP_STILL_OK);
> > > +			} else {
> > > +				/*
> > > +				 * If you hit this warning and you need to
> > > +				 * quickly workaround this check, boot with
> > > +				 * allow_driver_override=1 on the kernel
> > > +				 * commandline. The right fix is to set the
> > > +				 * driver's .support_driver_override property.
> > > +				 */
> > > +				dev_warn(dev, "Suppressed driver override binding to %s.\n", drv->name);
> >
> > Maybe "Disallowed" instead of "Suppressed" in the message? Even better,
> > could the name of the device be provided? For example,
> >
> > "Disallowed bind of driver %s to device %s using driver override"
> 
> dev_warn() emits the device name.

Oh, right. Ignore my comment about the device name. I just tried it
with a Hyper-V VMBus synthetic device, and here's the output, which
is fine:

[   80.105203] vmbus 0f749bd1-5637-4279-91f1-bde768dd030f: Suppressed driver override binding to uio_hv_generic.

VMBus device names are full GUIDs, which isn't super handy, but it
is what it is. :-(

Michael

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] driver core: Disable driver overriding by default
  2026-11-16 11:08 [PATCH] driver core: Disable driver overriding by default Uwe Kleine-König
  2026-11-16 11:36 ` sashiko-bot
  2026-11-18  5:51 ` Michael Kelley
@ 2026-11-18 16:04 ` Bradley Morgan
  2026-11-18 16:22 ` Danilo Krummrich
  2026-11-19  3:35 ` [PATCH] driver core: Disable driver overriding by default Armin Wolf
  4 siblings, 0 replies; 33+ messages in thread
From: Bradley Morgan @ 2026-11-18 16:04 UTC (permalink / raw)
  To: Uwe Kleine-König, Greg Kroah-Hartman
  Cc: Jonathan Corbet, Shuah Khan, Randy Dunlap, Rafael J. Wysocki,
	Danilo Krummrich, Johan Hovold, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, David Lechner, Armin Wolf, Thierry Reding,
	Mike Rapoport (Microsoft), Arnd Bergmann, Karl Mehltretter,
	Paul E. McKenney, Borislav Petkov (AMD), Dapeng Mi, Marco Elver,
	Ethan Nelson-Moore, Jeff Layton, Andrew Morton, Petr Mladek,
	Pnina Feder, Mete Durlu, Aaron Tomlin, Rio, Feng Tang, linux-doc,
	linux-kernel, driver-core, linux-trace-kernel, Mark Brown,
	Bjorn Helgaas, Alex Williamson

On 16 November 2026 11:08:52 GMT, "Uwe Kleine-König"
<u.kleine-koenig@baylibre.com> wrote:
>Driver overriding is useful only in a very limited set of situations
>and then only with very few drivers that are designed to support that.
>
>Disallow matching via driver_override unless the driver explicitly
>allows it or the safe guard is disabled using the
>"allow_driver_override=1" kernel parameter.
>
>There are many drivers that don't expect to be force-bound and often
>doing it anyhow results in a NULL pointer exception. To make debugging
>such cases easier, add a new taint if such a forced match happens.
>
>Implementation detail: device_match_driver_override() isn't a static
>inline any more. It grew a certain complexity (e.g. a pr_info()) and so
>was made a regular exported function.

Ooh. Interesting.

Reviewed-by: Bradley Morgan <bradley.morgan@linux.dev>


>
>Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
>---
>Hello,
>
>this is a rebase to current next of the series
>https://lore.kernel.org/all/cover.1790612298.git.u.kleine-koenig@baylibre.com/
>. It combines the functionality of former patches #2 and #3 (#1 was a
>fix that was already applied). I also addressed sashiko's comments. I
>think
>this matches what most people want in the previous discussion.
>
>As the rebase wasn't trivial and I merged the two patches, I didn't
>apply the review tags I already received for v3.
>
>If this patch is accepted, a number of drivers that are supposed to be
>force-bound need to get their .support_driver_override property set. I'm
>aware of the following:
>
> - spidev_spi_driver in drivers/spi/spidev.c
> - stub_driver in drivers/pci/pci-stub.c
> - uio_dmem_genirq in drivers/uio/uio_dmem_genirq.c
> - uio_pci_driver in drivers/uio/uio_pci_generic.c
> - uio_pdrv_genirq in drivers/uio/uio_pdrv_genirq.c
> - vfio_amba_driver in drivers/vfio/platform/vfio_amba.c
> - vfio_ccw_sch_driver in drivers/s390/cio/vfio_ccw_drv.c
> - vfio_pci_driver in drivers/vfio/pci/vfio_pci.c
> - vfio_platform_driver in drivers/vfio/platform/vfio_platform.c
>
>This is not needed for the userspace i2c driver.
>
>As the flag to set is only introduced in this patch and assuming this
>patch is accepted, I suggest to create an immutable branch for it to
>allow setting the needed flags in driver trees. Alternatively let all
>these go together via a single tree or branch.
>
>Best regards
>Uwe
>
> .../admin-guide/kernel-parameters.txt         |  6 +++
> Documentation/admin-guide/tainted-kernels.rst | 54 ++++++++++---------
> drivers/base/bus.c                            | 50 +++++++++++++++++
> include/linux/device.h                        | 19 +------
> include/linux/device/driver.h                 |  2 +
> include/linux/panic.h                         |  3 +-
> include/trace/events/module.h                 |  3 +-
> kernel/panic.c                                |  3 +-
> tools/debugging/kernel-chktaint               |  9 ++++
> 9 files changed, 104 insertions(+), 45 deletions(-)
>
>diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
>index 85804cfe7ef6..aabc97feef9b 100644
>--- a/Documentation/admin-guide/kernel-parameters.txt
>+++ b/Documentation/admin-guide/kernel-parameters.txt
>@@ -424,6 +424,12 @@ Kernel parameters
> 			do not want to use tracing_snapshot_alloc() as it needs
> 			to be done where GFP_KERNEL allocations are allowed.
> 
>+	allow_driver_override=
>+			When set to 1 allow matching drivers without
>+			.support_driver_override = true to devices using
>+			driver_override. This is a dangerous operation in
>+			general allowing root to oops the kernel.
>+
> 	allow_mismatched_32bit_el0 [ARM64,EARLY]
> 			Allow execve() of 32-bit applications and setting of the
> 			PER_LINUX32 personality on systems where only a strict
>diff --git a/Documentation/admin-guide/tainted-kernels.rst b/Documentation/admin-guide/tainted-kernels.rst
>index fcb8b9734548..e6bab575ccef 100644
>--- a/Documentation/admin-guide/tainted-kernels.rst
>+++ b/Documentation/admin-guide/tainted-kernels.rst
>@@ -74,35 +74,36 @@ a particular type of taint. It's best to leave that to the aforementioned
> script, but if you need something quick you can use this shell command to
> check
> which bits are set::
> 
>-	$ for i in $(seq 0 19); do echo $i $(($(cat /proc/sys/kernel/tainted)>>$i&1));done
>+	$ for i in $(seq 0 20); do echo $i $(($(cat /proc/sys/kernel/tainted)>>$i&1));done
> 
> Table for decoding tainted state
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
>-===  ===  ======  ========================================================
>-Bit  Log  Number  Reason that got the kernel tainted
>-===  ===  ======  ========================================================
>-  0  G/P       1  proprietary module was loaded
>-  1  _/F       2  module was force loaded
>-  2  _/S       4  kernel running on an out of specification system
>-  3  _/R       8  module was force unloaded
>-  4  _/M      16  processor reported a Machine Check Exception (MCE)
>-  5  _/B      32  bad page referenced or some unexpected page flags
>-  6  _/U      64  taint requested by userspace application
>-  7  _/D     128  kernel died recently, i.e. there was an OOPS or BUG
>-  8  _/A     256  ACPI table overridden by user
>-  9  _/W     512  kernel issued warning
>- 10  _/C    1024  staging driver was loaded
>- 11  _/I    2048  workaround for bug in platform firmware applied
>- 12  _/O    4096  externally-built ("out-of-tree") module was loaded
>- 13  _/E    8192  unsigned module was loaded
>- 14  _/L   16384  soft lockup occurred
>- 15  _/K   32768  kernel has been live patched
>- 16  _/X   65536  auxiliary taint, defined for and used by distros
>- 17  _/T  131072  kernel was built with the struct randomization plugin
>- 18  _/N  262144  an in-kernel test has been run
>- 19  _/J  524288  userspace used a mutating debug operation in fwctl
>-===  ===  ======  ========================================================
>+===  ===  =======  ========================================================
>+Bit  Log   Number  Reason that got the kernel tainted
>+===  ===  =======  ========================================================
>+  0  G/P        1  proprietary module was loaded
>+  1  _/F        2  module was force loaded
>+  2  _/S        4  kernel running on an out of specification system
>+  3  _/R        8  module was force unloaded
>+  4  _/M       16  processor reported a Machine Check Exception (MCE)
>+  5  _/B       32  bad page referenced or some unexpected page flags
>+  6  _/U       64  taint requested by userspace application
>+  7  _/D      128  kernel died recently, i.e. there was an OOPS or BUG
>+  8  _/A      256  ACPI table overridden by user
>+  9  _/W      512  kernel issued warning
>+ 10  _/C     1024  staging driver was loaded
>+ 11  _/I     2048  workaround for bug in platform firmware applied
>+ 12  _/O     4096  externally-built ("out-of-tree") module was loaded
>+ 13  _/E     8192  unsigned module was loaded
>+ 14  _/L    16384  soft lockup occurred
>+ 15  _/K    32768  kernel has been live patched
>+ 16  _/X    65536  auxiliary taint, defined for and used by distros
>+ 17  _/T   131072  kernel was built with the struct randomization plugin
>+ 18  _/N   262144  an in-kernel test has been run
>+ 19  _/J   524288  userspace used a mutating debug operation in fwctl
>+ 20  _/Z  1048576  a driver was forced on a non-matching device
>+===  ===  =======  ========================================================
> 
> Note: The character ``_`` is representing a blank in this table to make reading
> easier.
>@@ -189,3 +190,6 @@ More detailed explanation for tainting
>  19) ``J`` if userspace opened /dev/fwctl/* and performed a FWTCL_RPC_DEBUG_WRITE
>      to use the devices debugging features. Device debugging features could
>      cause the device to malfunction in undefined ways.
>+
>+ 20) ``Z`` if a device was matched using the `driver_override` sysfs property
>+     to a driver that didn't explicitly allow that.
>diff --git a/drivers/base/bus.c b/drivers/base/bus.c
>index 396097fdb316..5344b20488fd 100644
>--- a/drivers/base/bus.c
>+++ b/drivers/base/bus.c
>@@ -603,6 +603,56 @@ int bus_add_device(struct device *dev)
> 	return error;
> }
> 
>+static bool __read_mostly allow_driver_override;
>+
>+static int __init allow_driver_override_setup(char *str)
>+{
>+	if (!str || kstrtobool(str, &allow_driver_override) < 0)
>+		allow_driver_override = true;
>+
>+	return 1;
>+}
>+__setup("allow_driver_override=", allow_driver_override_setup);
>+
>+/**
>+ * device_match_driver_override() - Match a driver against the device's driver_override.
>+ * @dev: device to check
>+ * @drv: driver to match against
>+ *
>+ * Returns > 0 if a driver override is set and matches the given driver, 0 if a
>+ * driver override is set but does not match, or < 0 if a driver override is not
>+ * set at all.
>+ */
>+int device_match_driver_override(struct device *dev,
>+				 const struct device_driver *drv)
>+{
>+	guard(spinlock)(&dev->driver_override.lock);
>+	if (dev->driver_override.name) {
>+		int ret = !strcmp(dev->driver_override.name, drv->name);
>+
>+		if (ret > 0 && !drv->support_driver_override) {
>+			if (allow_driver_override) {
>+				add_taint_module(drv->owner,
>+						 TAINT_DRIVER_OVERRIDE, LOCKDEP_STILL_OK);
>+			} else {
>+				/*
>+				 * If you hit this warning and you need to
>+				 * quickly workaround this check, boot with
>+				 * allow_driver_override=1 on the kernel
>+				 * commandline. The right fix is to set the
>+				 * driver's .support_driver_override property.
>+				 */
>+				dev_warn(dev, "Suppressed driver override binding to %s.\n", drv->name);
>+				return -1;
>+			}
>+		}
>+
>+		return ret;
>+	}
>+	return -1;
>+}
>+EXPORT_SYMBOL_GPL(device_match_driver_override);
>+
> static void __bus_probe_device(struct device *dev)
> {
> 	struct subsys_private *sp = bus_to_subsys(dev->bus);
>diff --git a/include/linux/device.h b/include/linux/device.h
>index 6b082c638d45..05413c1a9454 100644
>--- a/include/linux/device.h
>+++ b/include/linux/device.h
>@@ -907,23 +907,8 @@ static inline bool device_has_driver_override(struct device *dev)
> 	return !!dev->driver_override.name;
> }
> 
>-/**
>- * device_match_driver_override() - Match a driver against the device's driver_override.
>- * @dev: device to check
>- * @drv: driver to match against
>- *
>- * Returns > 0 if a driver override is set and matches the given driver, 0 if a
>- * driver override is set but does not match, or < 0 if a driver override is not
>- * set at all.
>- */
>-static inline int device_match_driver_override(struct device *dev,
>-					       const struct device_driver *drv)
>-{
>-	guard(spinlock)(&dev->driver_override.lock);
>-	if (dev->driver_override.name)
>-		return !strcmp(dev->driver_override.name, drv->name);
>-	return -1;
>-}
>+int device_match_driver_override(struct device *dev,
>+				 const struct device_driver *drv);
> 
> /**
>  * device_iommu_mapped - Returns true when the device DMA is translated
>diff --git a/include/linux/device/driver.h b/include/linux/device/driver.h
>index 29fbc01ef06f..0153cfcbe1b9 100644
>--- a/include/linux/device/driver.h
>+++ b/include/linux/device/driver.h
>@@ -56,6 +56,7 @@ enum probe_type {
>  * @bus:	The bus which the device of this driver belongs to.
>  * @owner:	The module owner.
>  * @mod_name:	Used for built-in modules.
>+ * @support_driver_override: driver_override only works if this is true.
>  * @suppress_bind_attrs: Disables bind/unbind via sysfs.
>  * @probe_type:	Type of the probe (synchronous or asynchronous) to use.
>  * @of_match_table: The open firmware table.
>@@ -104,6 +105,7 @@ struct device_driver {
> 	struct module		*owner;
> 	const char		*mod_name;	/* used for built-in modules */
> 
>+	bool support_driver_override;
> 	bool suppress_bind_attrs;	/* disables bind/unbind via sysfs */
> 	enum probe_type probe_type;
> 
>diff --git a/include/linux/panic.h b/include/linux/panic.h
>index 17e61b61c45f..009232511cc7 100644
>--- a/include/linux/panic.h
>+++ b/include/linux/panic.h
>@@ -89,7 +89,8 @@ static inline void set_arch_panic_timeout(int timeout, int arch_default_timeout)
> #define TAINT_RANDSTRUCT		17
> #define TAINT_TEST			18
> #define TAINT_FWCTL			19
>-#define TAINT_FLAGS_COUNT		20
>+#define TAINT_DRIVER_OVERRIDE		20
>+#define TAINT_FLAGS_COUNT		21
> #define TAINT_FLAGS_MAX			((1UL << TAINT_FLAGS_COUNT) - 1)
> 
> struct taint_flag {
>diff --git a/include/trace/events/module.h b/include/trace/events/module.h
>index e5a006be9dc6..d54ce3c7572b 100644
>--- a/include/trace/events/module.h
>+++ b/include/trace/events/module.h
>@@ -26,7 +26,8 @@ struct module;
> 	{ (1UL << TAINT_OOT_MODULE),		"O" },		\
> 	{ (1UL << TAINT_FORCED_MODULE),		"F" },		\
> 	{ (1UL << TAINT_CRAP),			"C" },		\
>-	{ (1UL << TAINT_UNSIGNED_MODULE),	"E" })
>+	{ (1UL << TAINT_UNSIGNED_MODULE),	"E" },		\
>+	{ (1UL << TAINT_DRIVER_OVERRIDE),	"Z" })
> 
> TRACE_EVENT(module_load,
> 
>diff --git a/kernel/panic.c b/kernel/panic.c
>index 91e48d33b7db..81ea9ef9afb0 100644
>--- a/kernel/panic.c
>+++ b/kernel/panic.c
>@@ -825,6 +825,7 @@ const struct taint_flag taint_flags[TAINT_FLAGS_COUNT] = {
> 	TAINT_FLAG(RANDSTRUCT,			'T', ' '),
> 	TAINT_FLAG(TEST,			'N', ' '),
> 	TAINT_FLAG(FWCTL,			'J', ' '),
>+	TAINT_FLAG(DRIVER_OVERRIDE,		'Z', ' '),
> };
> 
> #undef TAINT_FLAG
>@@ -861,7 +862,7 @@ static void print_tainted_seq(struct seq_buf *s, bool verbose)
>  * exact size is allocated dynamically; the initial buffer remains
>  * as a fallback if allocation fails.
>  *
>- * The verbose taint string currently requires up to 327 characters.
>+ * The verbose taint string currently requires up to 348 characters.
>  */
> #define INIT_TAINT_BUF_MAX 350
> 
>diff --git a/tools/debugging/kernel-chktaint b/tools/debugging/kernel-chktaint
>index e1571c04afb5..56215e0f5112 100755
>--- a/tools/debugging/kernel-chktaint
>+++ b/tools/debugging/kernel-chktaint
>@@ -211,6 +211,15 @@ else
> 	addout "J"
> 	echo " * fwctl's mutating debug interface was used (#19)"
> fi
>+
>+T=`expr $T / 2`
>+if [ `expr $T % 2` -eq 0 ]; then
>+	addout " "
>+else
>+	addout "Z"
>+	echo " * A device was matched using driver_override to a driver not supporting that (#20)"
>+fi
>+
> echo "Raw taint value as int/string: $taint/'$out'"
> 
> # report on any tainted loadable modules
>
>base-commit: 84abb955b1015477aa11a96e2f3ac1b938b77f48
>

--- Thanks!

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] driver core: Disable driver overriding by default
  2026-11-16 11:08 [PATCH] driver core: Disable driver overriding by default Uwe Kleine-König
                   ` (2 preceding siblings ...)
  2026-11-18 16:04 ` Bradley Morgan
@ 2026-11-18 16:22 ` Danilo Krummrich
  2026-11-18 23:56   ` [PATCH] PCI: Allow untainted driver_override for PCI stub drivers Alex Williamson
                     ` (3 more replies)
  2026-11-19  3:35 ` [PATCH] driver core: Disable driver overriding by default Armin Wolf
  4 siblings, 4 replies; 33+ messages in thread
From: Danilo Krummrich @ 2026-11-18 16:22 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Greg Kroah-Hartman, Jonathan Corbet, Shuah Khan, Randy Dunlap,
	Rafael J. Wysocki, Johan Hovold, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, David Lechner, Armin Wolf, Thierry Reding,
	Mike Rapoport (Microsoft), Arnd Bergmann, Karl Mehltretter,
	Paul E. McKenney, Borislav Petkov (AMD), Dapeng Mi, Marco Elver,
	Ethan Nelson-Moore, Jeff Layton, Bradley Morgan, Andrew Morton,
	Petr Mladek, Pnina Feder, Mete Durlu, Aaron Tomlin, Rio,
	Feng Tang, linux-doc, linux-kernel, driver-core,
	linux-trace-kernel, Mark Brown, Bjorn Helgaas, Alex Williamson

On Mon Nov 16, 2026 at 12:08 PM CET, Uwe Kleine-König wrote:
> If this patch is accepted, a number of drivers that are supposed to be
> force-bound need to get their .support_driver_override property set. I'm
> aware of the following:
>
>  - spidev_spi_driver in drivers/spi/spidev.c
>  - stub_driver in drivers/pci/pci-stub.c
>  - uio_dmem_genirq in drivers/uio/uio_dmem_genirq.c
>  - uio_pci_driver in drivers/uio/uio_pci_generic.c
>  - uio_pdrv_genirq in drivers/uio/uio_pdrv_genirq.c
>  - vfio_amba_driver in drivers/vfio/platform/vfio_amba.c
>  - vfio_ccw_sch_driver in drivers/s390/cio/vfio_ccw_drv.c
>  - vfio_pci_driver in drivers/vfio/pci/vfio_pci.c
>  - vfio_platform_driver in drivers/vfio/platform/vfio_platform.c
>
> This is not needed for the userspace i2c driver.
>
> As the flag to set is only introduced in this patch and assuming this
> patch is accepted, I suggest to create an immutable branch for it to
> allow setting the needed flags in driver trees. Alternatively let all
> these go together via a single tree or branch.

Either is fine with me, but it's probably easier to just include the
corresponding patches in this series and merge them all together such that we
avoid having things broken in individual trees.

Can you please add the corresponding patches in a v2?

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH] PCI: Allow untainted driver_override for PCI stub drivers
  2026-11-18 16:22 ` Danilo Krummrich
@ 2026-11-18 23:56   ` Alex Williamson
  2026-11-19  0:03     ` sashiko-bot
                       ` (3 more replies)
  2026-11-18 23:56   ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
                     ` (2 subsequent siblings)
  3 siblings, 4 replies; 33+ messages in thread
From: Alex Williamson @ 2026-11-18 23:56 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Alex Williamson, Greg Kroah-Hartman, Jonathan Corbet, Shuah Khan,
	Randy Dunlap, Rafael J . Wysocki, Danilo Krummrich, Johan Hovold,
	Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	David Lechner, Armin Wolf, Thierry Reding, Mike Rapoport,
	Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton, Petr Mladek,
	Pnina Feder, Mete Durlu, Aaron Tomlin, Rio, Feng Tang, linux-doc,
	linux-kernel, driver-core, linux-trace-kernel, Mark Brown,
	Bjorn Helgaas, linux-pci

As the name suggests, the pci-stub driver is only a stub, it performs
no hardware access and is typically used only to prevent other drivers
from binding to the device.

Similarly, pci-pf-stub only interacts with devices through the SR-IOV
capability, and may be used to create VFs on any PF that otherwise does
not require a PF driver.

Both of these are often used with driver_override, as this is our
standard, non-racy mechanism for associating a driver to a device.
With the introduction of support_driver_override in driver core, this
use case needs to be explicitly flagged as safe or else the bind will
be denied or taint the kernel.  Declare these drivers as safe for use
with driver_override.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Signed-off-by: Alex Williamson <alex@shazbot.org>
---

Uwe, both these PCI stub drivers should allow driver_override use cases.
Thanks,

Alex

 drivers/pci/pci-pf-stub.c | 1 +
 drivers/pci/pci-stub.c    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/pci/pci-pf-stub.c b/drivers/pci/pci-pf-stub.c
index da4db4928907..328fb4a57092 100644
--- a/drivers/pci/pci-pf-stub.c
+++ b/drivers/pci/pci-pf-stub.c
@@ -36,6 +36,7 @@ static struct pci_driver pf_stub_driver = {
 	.id_table		= pci_pf_stub_whitelist,
 	.probe			= pci_pf_stub_probe,
 	.sriov_configure	= pci_sriov_configure_simple,
+	.driver.support_driver_override = true,
 };
 module_pci_driver(pf_stub_driver);
 
diff --git a/drivers/pci/pci-stub.c b/drivers/pci/pci-stub.c
index 9bc478df4e8f..acbd43c17adc 100644
--- a/drivers/pci/pci-stub.c
+++ b/drivers/pci/pci-stub.c
@@ -37,6 +37,7 @@ static struct pci_driver stub_driver = {
 	.id_table	= NULL,	/* only dynamic id's */
 	.probe		= pci_stub_probe,
 	.driver_managed_dma = true,
+	.driver.support_driver_override = true,
 };
 
 static int __init pci_stub_init(void)
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH] vfio: Allow untainted use of driver_override
  2026-11-18 16:22 ` Danilo Krummrich
  2026-11-18 23:56   ` [PATCH] PCI: Allow untainted driver_override for PCI stub drivers Alex Williamson
@ 2026-11-18 23:56   ` Alex Williamson
  2026-11-19  0:09     ` sashiko-bot
                       ` (7 more replies)
  2026-11-19  5:15   ` [PATCH] s390/vfio: " Alex Williamson
  2026-11-19 17:01   ` ✗ LGCI.VerificationFailed: failure for vfio: " Patchwork
  3 siblings, 8 replies; 33+ messages in thread
From: Alex Williamson @ 2026-11-18 23:56 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Alex Williamson, Greg Kroah-Hartman, Jonathan Corbet, Shuah Khan,
	Randy Dunlap, Rafael J . Wysocki, Danilo Krummrich, Johan Hovold,
	Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	David Lechner, Armin Wolf, Thierry Reding, Mike Rapoport,
	Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton, Petr Mladek,
	Pnina Feder, Mete Durlu, Aaron Tomlin, Rio, Feng Tang, linux-doc,
	linux-kernel, driver-core, linux-trace-kernel, Mark Brown,
	Bjorn Helgaas, Yishai Hadas, Longfang Liu, Ankit Agrawal,
	Brett Creeley, Giovanni Cabiddu, Michał Winiarski,
	Julian Ruess, Nipun Gupta, Nikhil Agarwal, Eric Auger,
	Mostafa Saleh, Pranjal Shrivastava, Ioana Ciornei, qat-linux,
	virtualization, intel-xe, kvm

Driver overrides are the standard mechanism for binding vfio drivers
to devices.  With the introduction of the support_driver_override flag
in the core driver struct, it's now required for drivers to declare
themselves as driver_override compatible, otherwise driver_override
bindings will be denied or generate a kernel taint.

Set the support_driver_override flag on the driver struct across all
vfio drivers.

Cc: Yishai Hadas <yishaih@nvidia.com>
Cc: Longfang Liu <liulongfang@huawei.com>
Cc: Ankit Agrawal <ankita@nvidia.com>
Cc: Brett Creeley <brett.creeley@amd.com>
Cc: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Julian Ruess <julianr@linux.ibm.com>
Cc: Nipun Gupta <nipun.gupta@amd.com>
Cc: Nikhil Agarwal <nikhil.agarwal@amd.com>
Cc: Eric Auger <eric.auger@redhat.com>
Cc: Mostafa Saleh <smostafa@google.com>
Cc: Pranjal Shrivastava <praan@google.com>
Cc: Ioana Ciornei <ioana.ciornei@nxp.com>
Cc: qat-linux@intel.com
Cc: virtualization@lists.linux.dev
Cc: intel-xe@lists.freedesktop.org
Cc: kvm@vger.kernel.org
Signed-off-by: Alex Williamson <alex@shazbot.org>
---

Uwe, this should cover all the vfio drivers that expect to use
driver_override.  Thanks,

Alex

 drivers/vfio/cdx/main.c                        | 1 +
 drivers/vfio/fsl-mc/vfio_fsl_mc.c              | 1 +
 drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 3 ++-
 drivers/vfio/pci/ism/main.c                    | 3 ++-
 drivers/vfio/pci/mlx5/main.c                   | 3 ++-
 drivers/vfio/pci/nvgrace-gpu/main.c            | 3 ++-
 drivers/vfio/pci/pds/pci_drv.c                 | 3 ++-
 drivers/vfio/pci/qat/main.c                    | 3 ++-
 drivers/vfio/pci/vfio_pci.c                    | 3 ++-
 drivers/vfio/pci/virtio/main.c                 | 3 ++-
 drivers/vfio/pci/xe/main.c                     | 3 ++-
 drivers/vfio/platform/vfio_amba.c              | 1 +
 drivers/vfio/platform/vfio_platform.c          | 1 +
 13 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/drivers/vfio/cdx/main.c b/drivers/vfio/cdx/main.c
index 28dc8c825600..fb7679bf92fd 100644
--- a/drivers/vfio/cdx/main.c
+++ b/drivers/vfio/cdx/main.c
@@ -358,6 +358,7 @@ static struct cdx_driver vfio_cdx_driver = {
 	.match_id_table	= vfio_cdx_table,
 	.driver	= {
 		.name	= "vfio-cdx",
+		.support_driver_override = true,
 	},
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
index 15b05b8c0c90..1603f81e0257 100644
--- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
+++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
@@ -597,6 +597,7 @@ static struct fsl_mc_driver vfio_fsl_mc_driver = {
 	.remove		= vfio_fsl_mc_remove,
 	.driver	= {
 		.name	= "vfio-fsl-mc",
+		.support_driver_override = true,
 	},
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
index c82c59246a3f..5c56aff8db01 100644
--- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
+++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
@@ -1737,7 +1737,8 @@ static struct pci_driver hisi_acc_vfio_pci_driver = {
 	.id_table = hisi_acc_vfio_pci_table,
 	.probe = hisi_acc_vfio_pci_probe,
 	.remove = hisi_acc_vfio_pci_remove,
-	.driver = { .pm = pm_ptr(&hisi_acc_vf_pm_ops) },
+	.driver = { .pm = pm_ptr(&hisi_acc_vf_pm_ops),
+		    .support_driver_override = true },
 	.err_handler = &hisi_acc_vf_err_handlers,
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/pci/ism/main.c b/drivers/vfio/pci/ism/main.c
index cce3bdf1f070..263b377e87c4 100644
--- a/drivers/vfio/pci/ism/main.c
+++ b/drivers/vfio/pci/ism/main.c
@@ -399,7 +399,8 @@ static struct pci_driver ism_vfio_pci_driver = {
 	.id_table = ism_device_table,
 	.probe = ism_vfio_pci_probe,
 	.remove = ism_vfio_pci_remove,
-	.driver	= { .pm = pm_ptr(&ism_vfio_pm_ops) },
+	.driver	= { .pm = pm_ptr(&ism_vfio_pm_ops),
+		    .support_driver_override = true },
 	.err_handler = &ism_vfio_err_handlers,
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/pci/mlx5/main.c b/drivers/vfio/pci/mlx5/main.c
index 18a6d224b1fd..63c89e461be8 100644
--- a/drivers/vfio/pci/mlx5/main.c
+++ b/drivers/vfio/pci/mlx5/main.c
@@ -1451,7 +1451,8 @@ static struct pci_driver mlx5vf_pci_driver = {
 	.id_table = mlx5vf_pci_table,
 	.probe = mlx5vf_pci_probe,
 	.remove = mlx5vf_pci_remove,
-	.driver	= { .pm = pm_ptr(&mlx5vf_pm_ops) },
+	.driver	= { .pm = pm_ptr(&mlx5vf_pm_ops),
+		    .support_driver_override = true },
 	.err_handler = &mlx5vf_err_handlers,
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/pci/nvgrace-gpu/main.c b/drivers/vfio/pci/nvgrace-gpu/main.c
index 5ddec340b73b..946da32c61ff 100644
--- a/drivers/vfio/pci/nvgrace-gpu/main.c
+++ b/drivers/vfio/pci/nvgrace-gpu/main.c
@@ -1438,7 +1438,8 @@ static struct pci_driver nvgrace_gpu_vfio_pci_driver = {
 	.id_table = nvgrace_gpu_vfio_pci_table,
 	.probe = nvgrace_gpu_probe,
 	.remove = nvgrace_gpu_remove,
-	.driver = { .pm = pm_ptr(&nvgrace_gpu_pm_ops) },
+	.driver = { .pm = pm_ptr(&nvgrace_gpu_pm_ops),
+		    .support_driver_override = true },
 	.err_handler = &nvgrace_gpu_vfio_pci_err_handlers,
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/pci/pds/pci_drv.c b/drivers/vfio/pci/pds/pci_drv.c
index cf7e33d4d17b..1fcef987f1b0 100644
--- a/drivers/vfio/pci/pds/pci_drv.c
+++ b/drivers/vfio/pci/pds/pci_drv.c
@@ -184,7 +184,8 @@ static struct pci_driver pds_vfio_pci_driver = {
 	.id_table = pds_vfio_pci_table,
 	.probe = pds_vfio_pci_probe,
 	.remove = pds_vfio_pci_remove,
-	.driver = { .pm = pm_ptr(&pds_vfio_pm_ops) },
+	.driver = { .pm = pm_ptr(&pds_vfio_pm_ops),
+		    .support_driver_override = true },
 	.err_handler = &pds_vfio_pci_err_handlers,
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/pci/qat/main.c b/drivers/vfio/pci/qat/main.c
index 69448fa57df4..8a616f9b6494 100644
--- a/drivers/vfio/pci/qat/main.c
+++ b/drivers/vfio/pci/qat/main.c
@@ -695,7 +695,8 @@ static struct pci_driver qat_vf_vfio_pci_driver = {
 	.id_table = qat_vf_vfio_pci_table,
 	.probe = qat_vf_vfio_pci_probe,
 	.remove = qat_vf_vfio_pci_remove,
-	.driver	= { .pm = pm_ptr(&qat_vf_pm_ops) },
+	.driver	= { .pm = pm_ptr(&qat_vf_pm_ops),
+		    .support_driver_override = true },
 	.err_handler = &qat_vf_err_handlers,
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
index e7c012febe91..fde2c3fc88eb 100644
--- a/drivers/vfio/pci/vfio_pci.c
+++ b/drivers/vfio/pci/vfio_pci.c
@@ -260,7 +260,8 @@ static struct pci_driver vfio_pci_driver = {
 	.remove			= vfio_pci_remove,
 	.sriov_configure	= vfio_pci_sriov_configure,
 	.err_handler		= &vfio_pci_err_handlers,
-	.driver		= { .pm = pm_ptr(&vfio_pci_pm_ops) },
+	.driver		= { .pm = pm_ptr(&vfio_pci_pm_ops),
+			    .support_driver_override = true },
 	.driver_managed_dma	= true,
 };
 
diff --git a/drivers/vfio/pci/virtio/main.c b/drivers/vfio/pci/virtio/main.c
index 123ff5193812..1e02a8fd4a61 100644
--- a/drivers/vfio/pci/virtio/main.c
+++ b/drivers/vfio/pci/virtio/main.c
@@ -222,7 +222,8 @@ static struct pci_driver virtiovf_pci_driver = {
 	.id_table = virtiovf_pci_table,
 	.probe = virtiovf_pci_probe,
 	.remove = virtiovf_pci_remove,
-	.driver = { .pm = pm_ptr(&virtiovf_pm_ops) },
+	.driver = { .pm = pm_ptr(&virtiovf_pm_ops),
+		    .support_driver_override = true },
 	.err_handler = &virtiovf_err_handlers,
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/pci/xe/main.c b/drivers/vfio/pci/xe/main.c
index 7dab3e024aa8..e0ab61f604de 100644
--- a/drivers/vfio/pci/xe/main.c
+++ b/drivers/vfio/pci/xe/main.c
@@ -592,7 +592,8 @@ static struct pci_driver xe_vfio_pci_driver = {
 	.id_table = xe_vfio_pci_table,
 	.probe = xe_vfio_pci_probe,
 	.remove = xe_vfio_pci_remove,
-	.driver = { .pm = pm_ptr(&xe_vfio_pm_ops) },
+	.driver = { .pm = pm_ptr(&xe_vfio_pm_ops),
+		    .support_driver_override = true },
 	.err_handler = &xe_vfio_pci_err_handlers,
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/platform/vfio_amba.c b/drivers/vfio/platform/vfio_amba.c
index fa754f203b2d..2c87caf1b7f7 100644
--- a/drivers/vfio/platform/vfio_amba.c
+++ b/drivers/vfio/platform/vfio_amba.c
@@ -137,6 +137,7 @@ static struct amba_driver vfio_amba_driver = {
 	.id_table = vfio_amba_ids,
 	.drv = {
 		.name = "vfio-amba",
+		.support_driver_override = true,
 	},
 	.driver_managed_dma = true,
 };
diff --git a/drivers/vfio/platform/vfio_platform.c b/drivers/vfio/platform/vfio_platform.c
index a4d3ace3e02d..93d06032cdde 100644
--- a/drivers/vfio/platform/vfio_platform.c
+++ b/drivers/vfio/platform/vfio_platform.c
@@ -116,6 +116,7 @@ static struct platform_driver vfio_platform_driver = {
 	.remove		= vfio_platform_remove,
 	.driver	= {
 		.name	= "vfio-platform",
+		.support_driver_override = true,
 	},
 	.driver_managed_dma = true,
 };
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [PATCH] PCI: Allow untainted driver_override for PCI stub drivers
  2026-11-18 23:56   ` [PATCH] PCI: Allow untainted driver_override for PCI stub drivers Alex Williamson
@ 2026-11-19  0:03     ` sashiko-bot
  2026-11-20  2:32     ` kernel test robot
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 33+ messages in thread
From: sashiko-bot @ 2026-11-19  0:03 UTC (permalink / raw)
  To: Alex Williamson; +Cc: linux-trace-kernel, linux-pci

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] PCI: build failure due to missing support_driver_override in
  device_driver
--

commit 6d515d8bf97cee4e2be39125c16fa6391240af86
Author: Alex Williamson <alex@shazbot.org>

PCI: Allow untainted driver_override for PCI stub drivers

This commit sets .driver.support_driver_override = true on pf_stub_driver and
stub_driver to declare them safe for driver_override bindings.

> diff --git a/drivers/pci/pci-pf-stub.c b/drivers/pci/pci-pf-stub.c
> index da4db4928907e..328fb4a57092c 100644
> --- a/drivers/pci/pci-pf-stub.c
> +++ b/drivers/pci/pci-pf-stub.c
> @@ -36,6 +36,7 @@ static struct pci_driver pf_stub_driver = {
>  	.id_table		= pci_pf_stub_whitelist,
>  	.probe			= pci_pf_stub_probe,
>  	.sriov_configure	= pci_sriov_configure_simple,
> +	.driver.support_driver_override = true,
>  };
>  module_pci_driver(pf_stub_driver);
>  
> diff --git a/drivers/pci/pci-stub.c b/drivers/pci/pci-stub.c
> index 9bc478df4e8f0..acbd43c17adc7 100644
> --- a/drivers/pci/pci-stub.c
> +++ b/drivers/pci/pci-stub.c
> @@ -37,6 +37,7 @@ static struct pci_driver stub_driver = {
>  	.id_table	= NULL,	/* only dynamic id's */
>  	.probe		= pci_stub_probe,
>  	.driver_managed_dma = true,
> +	.driver.support_driver_override = true,
>  };
>  
>  static int __init pci_stub_init(void)

[Severity: High]
Does this fail to build when CONFIG_PCI_PF_STUB or CONFIG_PCI_STUB is
enabled?  struct device_driver in include/linux/device/driver.h has no
support_driver_override member in this tree, as the prerequisite driver-core
patch introducing it is missing.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261118235645.2907908-1-alex@shazbot.org?part=1

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
  2026-11-18 23:56   ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
@ 2026-11-19  0:09     ` sashiko-bot
  2026-11-19  0:12     ` Creeley, Brett
                       ` (6 subsequent siblings)
  7 siblings, 0 replies; 33+ messages in thread
From: sashiko-bot @ 2026-11-19  0:09 UTC (permalink / raw)
  To: Alex Williamson
  Cc: linux-trace-kernel, virtualization, intel-xe, kvm,
	Michael S. Tsirkin, Eugenio Perez

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] vfio: build failure due to missing support_driver_override in
  device_driver
- [Medium] vfio: missing support_driver_override on s390 vfio_ccw and
  vfio_ap drivers
--

commit e1a4bdaaf4e34e9a150096261c67507d2bd63625
Author: Alex Williamson <alex@shazbot.org>

vfio: Allow untainted use of driver_override

This commit sets the support_driver_override flag on the embedded device
driver structures across vfio drivers so that binding devices via
driver_override continues to work without tainting the kernel.

> Set the support_driver_override flag on the driver struct across all
> vfio drivers.

[Severity: Medium]
Should the s390 vfio drivers outside drivers/vfio/ also set
support_driver_override?

Both vfio_ccw_sch_driver in drivers/s390/cio/vfio_ccw_drv.c and
vfio_ap_drv in drivers/s390/crypto/vfio_ap_drv.c bind to devices via
device_match_driver_override() on css_bus_type and ap_bus_type, so
omitting them will deny or taint driver_override bindings for vfio_ccw
subchannels and vfio_ap queues.

> diff --git a/drivers/vfio/cdx/main.c b/drivers/vfio/cdx/main.c
> index 28dc8c8256006..fb7679bf92fd3 100644
> --- a/drivers/vfio/cdx/main.c
> +++ b/drivers/vfio/cdx/main.c
> @@ -358,6 +358,7 @@ static struct cdx_driver vfio_cdx_driver = {
>  	.match_id_table	= vfio_cdx_table,
>  	.driver	= {
>  		.name	= "vfio-cdx",
> +		.support_driver_override = true,
>  	},
>  	.driver_managed_dma = true,
>  };

[Severity: High]
Is this missing the prerequisite driver-core patch that adds
support_driver_override to struct device_driver?  In this tree, struct
device_driver in include/linux/device/driver.h has no
support_driver_override member, so building any of the 13 modified vfio
drivers fails with an unknown field in initializer error.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261118235645.2907908-2-alex@shazbot.org?part=1

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
  2026-11-18 23:56   ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
  2026-11-19  0:09     ` sashiko-bot
@ 2026-11-19  0:12     ` Creeley, Brett
  2026-11-19 14:56     ` Mostafa Saleh
                       ` (5 subsequent siblings)
  7 siblings, 0 replies; 33+ messages in thread
From: Creeley, Brett @ 2026-11-19  0:12 UTC (permalink / raw)
  To: Alex Williamson, Uwe Kleine-König
  Cc: Greg Kroah-Hartman, Jonathan Corbet, Shuah Khan, Randy Dunlap,
	Rafael J . Wysocki, Danilo Krummrich, Johan Hovold,
	Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	David Lechner, Armin Wolf, Thierry Reding, Mike Rapoport,
	Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton, Petr Mladek,
	Pnina Feder, Mete Durlu, Aaron Tomlin, Rio, Feng Tang, linux-doc,
	linux-kernel, driver-core, linux-trace-kernel, Mark Brown,
	Bjorn Helgaas, Yishai Hadas, Longfang Liu, Ankit Agrawal,
	Brett Creeley, Giovanni Cabiddu, Michał Winiarski,
	Julian Ruess, Nipun Gupta, Nikhil Agarwal, Eric Auger,
	Mostafa Saleh, Pranjal Shrivastava, Ioana Ciornei, qat-linux,
	virtualization, intel-xe, kvm



On 11/18/2026 3:56 PM, Alex Williamson wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> Driver overrides are the standard mechanism for binding vfio drivers
> to devices.  With the introduction of the support_driver_override flag
> in the core driver struct, it's now required for drivers to declare
> themselves as driver_override compatible, otherwise driver_override
> bindings will be denied or generate a kernel taint.
>
> Set the support_driver_override flag on the driver struct across all
> vfio drivers.
>
> Cc: Yishai Hadas <yishaih@nvidia.com>
> Cc: Longfang Liu <liulongfang@huawei.com>
> Cc: Ankit Agrawal <ankita@nvidia.com>
> Cc: Brett Creeley <brett.creeley@amd.com>
> Cc: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Julian Ruess <julianr@linux.ibm.com>
> Cc: Nipun Gupta <nipun.gupta@amd.com>
> Cc: Nikhil Agarwal <nikhil.agarwal@amd.com>
> Cc: Eric Auger <eric.auger@redhat.com>
> Cc: Mostafa Saleh <smostafa@google.com>
> Cc: Pranjal Shrivastava <praan@google.com>
> Cc: Ioana Ciornei <ioana.ciornei@nxp.com>
> Cc: qat-linux@intel.com
> Cc: virtualization@lists.linux.dev
> Cc: intel-xe@lists.freedesktop.org
> Cc: kvm@vger.kernel.org
> Signed-off-by: Alex Williamson <alex@shazbot.org>
> ---
>
> Uwe, this should cover all the vfio drivers that expect to use
> driver_override.  Thanks,
>
> Alex
>
>   drivers/vfio/cdx/main.c                        | 1 +
>   drivers/vfio/fsl-mc/vfio_fsl_mc.c              | 1 +
>   drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 3 ++-
>   drivers/vfio/pci/ism/main.c                    | 3 ++-
>   drivers/vfio/pci/mlx5/main.c                   | 3 ++-
>   drivers/vfio/pci/nvgrace-gpu/main.c            | 3 ++-
>   drivers/vfio/pci/pds/pci_drv.c                 | 3 ++-
>   drivers/vfio/pci/qat/main.c                    | 3 ++-
>   drivers/vfio/pci/vfio_pci.c                    | 3 ++-
>   drivers/vfio/pci/virtio/main.c                 | 3 ++-
>   drivers/vfio/pci/xe/main.c                     | 3 ++-
>   drivers/vfio/platform/vfio_amba.c              | 1 +
>   drivers/vfio/platform/vfio_platform.c          | 1 +
>   13 files changed, 22 insertions(+), 9 deletions(-)
>
> <...>
>
> diff --git a/drivers/vfio/pci/pds/pci_drv.c b/drivers/vfio/pci/pds/pci_drv.c
> index cf7e33d4d17b..1fcef987f1b0 100644
> --- a/drivers/vfio/pci/pds/pci_drv.c
> +++ b/drivers/vfio/pci/pds/pci_drv.c
> @@ -184,7 +184,8 @@ static struct pci_driver pds_vfio_pci_driver = {
>          .id_table = pds_vfio_pci_table,
>          .probe = pds_vfio_pci_probe,
>          .remove = pds_vfio_pci_remove,
> -       .driver = { .pm = pm_ptr(&pds_vfio_pm_ops) },
> +       .driver = { .pm = pm_ptr(&pds_vfio_pm_ops),
> +                   .support_driver_override = true },
>          .err_handler = &pds_vfio_pci_err_handlers,
>          .driver_managed_dma = true,
>   };
LGTM.

Reviewed-by: Brett Creeley <brett.creeley@amd.com>


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] driver core: Disable driver overriding by default
  2026-11-16 11:08 [PATCH] driver core: Disable driver overriding by default Uwe Kleine-König
                   ` (3 preceding siblings ...)
  2026-11-18 16:22 ` Danilo Krummrich
@ 2026-11-19  3:35 ` Armin Wolf
  4 siblings, 0 replies; 33+ messages in thread
From: Armin Wolf @ 2026-11-19  3:35 UTC (permalink / raw)
  To: Uwe Kleine-König, Greg Kroah-Hartman
  Cc: Jonathan Corbet, Shuah Khan, Randy Dunlap, Rafael J. Wysocki,
	Danilo Krummrich, Johan Hovold, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, David Lechner, Thierry Reding,
	Mike Rapoport (Microsoft), Arnd Bergmann, Karl Mehltretter,
	Paul E. McKenney, Borislav Petkov (AMD), Dapeng Mi, Marco Elver,
	Ethan Nelson-Moore, Jeff Layton, Bradley Morgan, Andrew Morton,
	Petr Mladek, Pnina Feder, Mete Durlu, Aaron Tomlin, Rio,
	Feng Tang, linux-doc, linux-kernel, driver-core,
	linux-trace-kernel, Mark Brown, Bjorn Helgaas, Alex Williamson

Am 16.11.26 um 12:08 schrieb Uwe Kleine-König:

> Driver overriding is useful only in a very limited set of situations
> and then only with very few drivers that are designed to support that.
>
> Disallow matching via driver_override unless the driver explicitly
> allows it or the safe guard is disabled using the
> "allow_driver_override=1" kernel parameter.
>
> There are many drivers that don't expect to be force-bound and often
> doing it anyhow results in a NULL pointer exception. To make debugging
> such cases easier, add a new taint if such a forced match happens.
>
> Implementation detail: device_match_driver_override() isn't a static
> inline any more. It grew a certain complexity (e.g. a pr_info()) and so
> was made a regular exported function.

Reviewed-by: Armin Wolf <W_Armin@gmx.de>

> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> ---
> Hello,
>
> this is a rebase to current next of the series
> https://lore.kernel.org/all/cover.1790612298.git.u.kleine-koenig@baylibre.com/
> . It combines the functionality of former patches #2 and #3 (#1 was a
> fix that was already applied). I also addressed sashiko's comments. I think
> this matches what most people want in the previous discussion.
>
> As the rebase wasn't trivial and I merged the two patches, I didn't
> apply the review tags I already received for v3.
>
> If this patch is accepted, a number of drivers that are supposed to be
> force-bound need to get their .support_driver_override property set. I'm
> aware of the following:
>
>   - spidev_spi_driver in drivers/spi/spidev.c
>   - stub_driver in drivers/pci/pci-stub.c
>   - uio_dmem_genirq in drivers/uio/uio_dmem_genirq.c
>   - uio_pci_driver in drivers/uio/uio_pci_generic.c
>   - uio_pdrv_genirq in drivers/uio/uio_pdrv_genirq.c
>   - vfio_amba_driver in drivers/vfio/platform/vfio_amba.c
>   - vfio_ccw_sch_driver in drivers/s390/cio/vfio_ccw_drv.c
>   - vfio_pci_driver in drivers/vfio/pci/vfio_pci.c
>   - vfio_platform_driver in drivers/vfio/platform/vfio_platform.c
>
> This is not needed for the userspace i2c driver.
>
> As the flag to set is only introduced in this patch and assuming this
> patch is accepted, I suggest to create an immutable branch for it to
> allow setting the needed flags in driver trees. Alternatively let all
> these go together via a single tree or branch.
>
> Best regards
> Uwe
>
>   .../admin-guide/kernel-parameters.txt         |  6 +++
>   Documentation/admin-guide/tainted-kernels.rst | 54 ++++++++++---------
>   drivers/base/bus.c                            | 50 +++++++++++++++++
>   include/linux/device.h                        | 19 +------
>   include/linux/device/driver.h                 |  2 +
>   include/linux/panic.h                         |  3 +-
>   include/trace/events/module.h                 |  3 +-
>   kernel/panic.c                                |  3 +-
>   tools/debugging/kernel-chktaint               |  9 ++++
>   9 files changed, 104 insertions(+), 45 deletions(-)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index 85804cfe7ef6..aabc97feef9b 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -424,6 +424,12 @@ Kernel parameters
>   			do not want to use tracing_snapshot_alloc() as it needs
>   			to be done where GFP_KERNEL allocations are allowed.
>   
> +	allow_driver_override=
> +			When set to 1 allow matching drivers without
> +			.support_driver_override = true to devices using
> +			driver_override. This is a dangerous operation in
> +			general allowing root to oops the kernel.
> +
>   	allow_mismatched_32bit_el0 [ARM64,EARLY]
>   			Allow execve() of 32-bit applications and setting of the
>   			PER_LINUX32 personality on systems where only a strict
> diff --git a/Documentation/admin-guide/tainted-kernels.rst b/Documentation/admin-guide/tainted-kernels.rst
> index fcb8b9734548..e6bab575ccef 100644
> --- a/Documentation/admin-guide/tainted-kernels.rst
> +++ b/Documentation/admin-guide/tainted-kernels.rst
> @@ -74,35 +74,36 @@ a particular type of taint. It's best to leave that to the aforementioned
>   script, but if you need something quick you can use this shell command to check
>   which bits are set::
>   
> -	$ for i in $(seq 0 19); do echo $i $(($(cat /proc/sys/kernel/tainted)>>$i&1));done
> +	$ for i in $(seq 0 20); do echo $i $(($(cat /proc/sys/kernel/tainted)>>$i&1));done
>   
>   Table for decoding tainted state
>   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   
> -===  ===  ======  ========================================================
> -Bit  Log  Number  Reason that got the kernel tainted
> -===  ===  ======  ========================================================
> -  0  G/P       1  proprietary module was loaded
> -  1  _/F       2  module was force loaded
> -  2  _/S       4  kernel running on an out of specification system
> -  3  _/R       8  module was force unloaded
> -  4  _/M      16  processor reported a Machine Check Exception (MCE)
> -  5  _/B      32  bad page referenced or some unexpected page flags
> -  6  _/U      64  taint requested by userspace application
> -  7  _/D     128  kernel died recently, i.e. there was an OOPS or BUG
> -  8  _/A     256  ACPI table overridden by user
> -  9  _/W     512  kernel issued warning
> - 10  _/C    1024  staging driver was loaded
> - 11  _/I    2048  workaround for bug in platform firmware applied
> - 12  _/O    4096  externally-built ("out-of-tree") module was loaded
> - 13  _/E    8192  unsigned module was loaded
> - 14  _/L   16384  soft lockup occurred
> - 15  _/K   32768  kernel has been live patched
> - 16  _/X   65536  auxiliary taint, defined for and used by distros
> - 17  _/T  131072  kernel was built with the struct randomization plugin
> - 18  _/N  262144  an in-kernel test has been run
> - 19  _/J  524288  userspace used a mutating debug operation in fwctl
> -===  ===  ======  ========================================================
> +===  ===  =======  ========================================================
> +Bit  Log   Number  Reason that got the kernel tainted
> +===  ===  =======  ========================================================
> +  0  G/P        1  proprietary module was loaded
> +  1  _/F        2  module was force loaded
> +  2  _/S        4  kernel running on an out of specification system
> +  3  _/R        8  module was force unloaded
> +  4  _/M       16  processor reported a Machine Check Exception (MCE)
> +  5  _/B       32  bad page referenced or some unexpected page flags
> +  6  _/U       64  taint requested by userspace application
> +  7  _/D      128  kernel died recently, i.e. there was an OOPS or BUG
> +  8  _/A      256  ACPI table overridden by user
> +  9  _/W      512  kernel issued warning
> + 10  _/C     1024  staging driver was loaded
> + 11  _/I     2048  workaround for bug in platform firmware applied
> + 12  _/O     4096  externally-built ("out-of-tree") module was loaded
> + 13  _/E     8192  unsigned module was loaded
> + 14  _/L    16384  soft lockup occurred
> + 15  _/K    32768  kernel has been live patched
> + 16  _/X    65536  auxiliary taint, defined for and used by distros
> + 17  _/T   131072  kernel was built with the struct randomization plugin
> + 18  _/N   262144  an in-kernel test has been run
> + 19  _/J   524288  userspace used a mutating debug operation in fwctl
> + 20  _/Z  1048576  a driver was forced on a non-matching device
> +===  ===  =======  ========================================================
>   
>   Note: The character ``_`` is representing a blank in this table to make reading
>   easier.
> @@ -189,3 +190,6 @@ More detailed explanation for tainting
>    19) ``J`` if userspace opened /dev/fwctl/* and performed a FWTCL_RPC_DEBUG_WRITE
>        to use the devices debugging features. Device debugging features could
>        cause the device to malfunction in undefined ways.
> +
> + 20) ``Z`` if a device was matched using the `driver_override` sysfs property
> +     to a driver that didn't explicitly allow that.
> diff --git a/drivers/base/bus.c b/drivers/base/bus.c
> index 396097fdb316..5344b20488fd 100644
> --- a/drivers/base/bus.c
> +++ b/drivers/base/bus.c
> @@ -603,6 +603,56 @@ int bus_add_device(struct device *dev)
>   	return error;
>   }
>   
> +static bool __read_mostly allow_driver_override;
> +
> +static int __init allow_driver_override_setup(char *str)
> +{
> +	if (!str || kstrtobool(str, &allow_driver_override) < 0)
> +		allow_driver_override = true;
> +
> +	return 1;
> +}
> +__setup("allow_driver_override=", allow_driver_override_setup);
> +
> +/**
> + * device_match_driver_override() - Match a driver against the device's driver_override.
> + * @dev: device to check
> + * @drv: driver to match against
> + *
> + * Returns > 0 if a driver override is set and matches the given driver, 0 if a
> + * driver override is set but does not match, or < 0 if a driver override is not
> + * set at all.
> + */
> +int device_match_driver_override(struct device *dev,
> +				 const struct device_driver *drv)
> +{
> +	guard(spinlock)(&dev->driver_override.lock);
> +	if (dev->driver_override.name) {
> +		int ret = !strcmp(dev->driver_override.name, drv->name);
> +
> +		if (ret > 0 && !drv->support_driver_override) {
> +			if (allow_driver_override) {
> +				add_taint_module(drv->owner,
> +						 TAINT_DRIVER_OVERRIDE, LOCKDEP_STILL_OK);
> +			} else {
> +				/*
> +				 * If you hit this warning and you need to
> +				 * quickly workaround this check, boot with
> +				 * allow_driver_override=1 on the kernel
> +				 * commandline. The right fix is to set the
> +				 * driver's .support_driver_override property.
> +				 */
> +				dev_warn(dev, "Suppressed driver override binding to %s.\n", drv->name);
> +				return -1;
> +			}
> +		}
> +
> +		return ret;
> +	}
> +	return -1;
> +}
> +EXPORT_SYMBOL_GPL(device_match_driver_override);
> +
>   static void __bus_probe_device(struct device *dev)
>   {
>   	struct subsys_private *sp = bus_to_subsys(dev->bus);
> diff --git a/include/linux/device.h b/include/linux/device.h
> index 6b082c638d45..05413c1a9454 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -907,23 +907,8 @@ static inline bool device_has_driver_override(struct device *dev)
>   	return !!dev->driver_override.name;
>   }
>   
> -/**
> - * device_match_driver_override() - Match a driver against the device's driver_override.
> - * @dev: device to check
> - * @drv: driver to match against
> - *
> - * Returns > 0 if a driver override is set and matches the given driver, 0 if a
> - * driver override is set but does not match, or < 0 if a driver override is not
> - * set at all.
> - */
> -static inline int device_match_driver_override(struct device *dev,
> -					       const struct device_driver *drv)
> -{
> -	guard(spinlock)(&dev->driver_override.lock);
> -	if (dev->driver_override.name)
> -		return !strcmp(dev->driver_override.name, drv->name);
> -	return -1;
> -}
> +int device_match_driver_override(struct device *dev,
> +				 const struct device_driver *drv);
>   
>   /**
>    * device_iommu_mapped - Returns true when the device DMA is translated
> diff --git a/include/linux/device/driver.h b/include/linux/device/driver.h
> index 29fbc01ef06f..0153cfcbe1b9 100644
> --- a/include/linux/device/driver.h
> +++ b/include/linux/device/driver.h
> @@ -56,6 +56,7 @@ enum probe_type {
>    * @bus:	The bus which the device of this driver belongs to.
>    * @owner:	The module owner.
>    * @mod_name:	Used for built-in modules.
> + * @support_driver_override: driver_override only works if this is true.
>    * @suppress_bind_attrs: Disables bind/unbind via sysfs.
>    * @probe_type:	Type of the probe (synchronous or asynchronous) to use.
>    * @of_match_table: The open firmware table.
> @@ -104,6 +105,7 @@ struct device_driver {
>   	struct module		*owner;
>   	const char		*mod_name;	/* used for built-in modules */
>   
> +	bool support_driver_override;
>   	bool suppress_bind_attrs;	/* disables bind/unbind via sysfs */
>   	enum probe_type probe_type;
>   
> diff --git a/include/linux/panic.h b/include/linux/panic.h
> index 17e61b61c45f..009232511cc7 100644
> --- a/include/linux/panic.h
> +++ b/include/linux/panic.h
> @@ -89,7 +89,8 @@ static inline void set_arch_panic_timeout(int timeout, int arch_default_timeout)
>   #define TAINT_RANDSTRUCT		17
>   #define TAINT_TEST			18
>   #define TAINT_FWCTL			19
> -#define TAINT_FLAGS_COUNT		20
> +#define TAINT_DRIVER_OVERRIDE		20
> +#define TAINT_FLAGS_COUNT		21
>   #define TAINT_FLAGS_MAX			((1UL << TAINT_FLAGS_COUNT) - 1)
>   
>   struct taint_flag {
> diff --git a/include/trace/events/module.h b/include/trace/events/module.h
> index e5a006be9dc6..d54ce3c7572b 100644
> --- a/include/trace/events/module.h
> +++ b/include/trace/events/module.h
> @@ -26,7 +26,8 @@ struct module;
>   	{ (1UL << TAINT_OOT_MODULE),		"O" },		\
>   	{ (1UL << TAINT_FORCED_MODULE),		"F" },		\
>   	{ (1UL << TAINT_CRAP),			"C" },		\
> -	{ (1UL << TAINT_UNSIGNED_MODULE),	"E" })
> +	{ (1UL << TAINT_UNSIGNED_MODULE),	"E" },		\
> +	{ (1UL << TAINT_DRIVER_OVERRIDE),	"Z" })
>   
>   TRACE_EVENT(module_load,
>   
> diff --git a/kernel/panic.c b/kernel/panic.c
> index 91e48d33b7db..81ea9ef9afb0 100644
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -825,6 +825,7 @@ const struct taint_flag taint_flags[TAINT_FLAGS_COUNT] = {
>   	TAINT_FLAG(RANDSTRUCT,			'T', ' '),
>   	TAINT_FLAG(TEST,			'N', ' '),
>   	TAINT_FLAG(FWCTL,			'J', ' '),
> +	TAINT_FLAG(DRIVER_OVERRIDE,		'Z', ' '),
>   };
>   
>   #undef TAINT_FLAG
> @@ -861,7 +862,7 @@ static void print_tainted_seq(struct seq_buf *s, bool verbose)
>    * exact size is allocated dynamically; the initial buffer remains
>    * as a fallback if allocation fails.
>    *
> - * The verbose taint string currently requires up to 327 characters.
> + * The verbose taint string currently requires up to 348 characters.
>    */
>   #define INIT_TAINT_BUF_MAX 350
>   
> diff --git a/tools/debugging/kernel-chktaint b/tools/debugging/kernel-chktaint
> index e1571c04afb5..56215e0f5112 100755
> --- a/tools/debugging/kernel-chktaint
> +++ b/tools/debugging/kernel-chktaint
> @@ -211,6 +211,15 @@ else
>   	addout "J"
>   	echo " * fwctl's mutating debug interface was used (#19)"
>   fi
> +
> +T=`expr $T / 2`
> +if [ `expr $T % 2` -eq 0 ]; then
> +	addout " "
> +else
> +	addout "Z"
> +	echo " * A device was matched using driver_override to a driver not supporting that (#20)"
> +fi
> +
>   echo "Raw taint value as int/string: $taint/'$out'"
>   
>   # report on any tainted loadable modules
>
> base-commit: 84abb955b1015477aa11a96e2f3ac1b938b77f48

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH] s390/vfio: Allow untainted use of driver_override
  2026-11-18 16:22 ` Danilo Krummrich
  2026-11-18 23:56   ` [PATCH] PCI: Allow untainted driver_override for PCI stub drivers Alex Williamson
  2026-11-18 23:56   ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
@ 2026-11-19  5:15   ` Alex Williamson
  2026-11-19  5:22     ` sashiko-bot
                       ` (4 more replies)
  2026-11-19 17:01   ` ✗ LGCI.VerificationFailed: failure for vfio: " Patchwork
  3 siblings, 5 replies; 33+ messages in thread
From: Alex Williamson @ 2026-11-19  5:15 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Alex Williamson, Greg Kroah-Hartman, Jonathan Corbet, Shuah Khan,
	Randy Dunlap, Rafael J . Wysocki, Danilo Krummrich, Johan Hovold,
	Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	David Lechner, Armin Wolf, Thierry Reding, Mike Rapoport,
	Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton, Petr Mladek,
	Pnina Feder, Mete Durlu, Aaron Tomlin, Rio, Feng Tang, linux-doc,
	linux-kernel, driver-core, linux-trace-kernel, Mark Brown,
	Bjorn Helgaas, Tony Krowiak, Jason Herne, Eric Farman,
	Matthew Rosato, Halil Pasic, linux-s390

The vfio_ap and vfio_ccw drivers bind devices through driver_override.
With the introduction of the support_driver_override flag in the core
driver struct, it's now required for drivers to declare themselves as
driver_override compatible, otherwise driver_override bindings will be
denied or generate a kernel taint.

Set the support_driver_override flag on the vfio_ap and vfio_ccw driver
structs.

Cc: Tony Krowiak <akrowiak@linux.ibm.com>
Cc: Jason Herne <jjherne@linux.ibm.com>
Cc: Eric Farman <farman@linux.ibm.com>
Cc: Matthew Rosato <mjrosato@linux.ibm.com>
Cc: Halil Pasic <pasic@linux.ibm.com>
Cc: linux-s390@vger.kernel.org
Signed-off-by: Alex Williamson <alex@shazbot.org>
---

Uwe, this should complete the vfio drivers needing driver override,
covering the s390 specific drivers.  Thanks,

Alex

 drivers/s390/cio/vfio_ccw_drv.c   | 1 +
 drivers/s390/crypto/vfio_ap_drv.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c
index 7546bd137e4e..77765cde87f7 100644
--- a/drivers/s390/cio/vfio_ccw_drv.c
+++ b/drivers/s390/cio/vfio_ccw_drv.c
@@ -375,6 +375,7 @@ static struct css_driver vfio_ccw_sch_driver = {
 	.drv = {
 		.name = "vfio_ccw",
 		.owner = THIS_MODULE,
+		.support_driver_override = true,
 	},
 	.subchannel_type = vfio_ccw_sch_ids,
 	.irq = vfio_ccw_sch_irq,
diff --git a/drivers/s390/crypto/vfio_ap_drv.c b/drivers/s390/crypto/vfio_ap_drv.c
index 8e69ed286bb9..2d47dc643269 100644
--- a/drivers/s390/crypto/vfio_ap_drv.c
+++ b/drivers/s390/crypto/vfio_ap_drv.c
@@ -62,6 +62,7 @@ static struct ap_driver vfio_ap_drv = {
 	.on_config_changed = vfio_ap_on_cfg_changed,
 	.on_scan_complete = vfio_ap_on_scan_complete,
 	.ids = ap_queue_ids,
+	.driver.support_driver_override = true,
 };
 
 static void vfio_ap_matrix_dev_release(struct device *dev)
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [PATCH] s390/vfio: Allow untainted use of driver_override
  2026-11-19  5:15   ` [PATCH] s390/vfio: " Alex Williamson
@ 2026-11-19  5:22     ` sashiko-bot
  2026-11-19 12:14     ` Anthony Krowiak
                       ` (3 subsequent siblings)
  4 siblings, 0 replies; 33+ messages in thread
From: sashiko-bot @ 2026-11-19  5:22 UTC (permalink / raw)
  To: Alex Williamson
  Cc: linux-trace-kernel, linux-s390, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Christian Borntraeger

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] s390/vfio: unknown field support_driver_override in struct
  device_driver
--

commit a91edca560e83afe4c0101413f2c0a4218259662
Author: Alex Williamson <alex@shazbot.org>

s390/vfio: Allow untainted use of driver_override

This commit sets the support_driver_override flag on the vfio_ccw_sch_driver
and vfio_ap_drv driver structs.

> diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c
> index 7546bd137e4e1..77765cde87f78 100644
> --- a/drivers/s390/cio/vfio_ccw_drv.c
> +++ b/drivers/s390/cio/vfio_ccw_drv.c
> @@ -375,6 +375,7 @@ static struct css_driver vfio_ccw_sch_driver = {
>  	.drv = {
>  		.name = "vfio_ccw",
>  		.owner = THIS_MODULE,
> +		.support_driver_override = true,
>  	},
>  	.subchannel_type = vfio_ccw_sch_ids,
>  	.irq = vfio_ccw_sch_irq,
> diff --git a/drivers/s390/crypto/vfio_ap_drv.c b/drivers/s390/crypto/vfio_ap_drv.c
> index 8e69ed286bb9c..2d47dc6432698 100644
> --- a/drivers/s390/crypto/vfio_ap_drv.c
> +++ b/drivers/s390/crypto/vfio_ap_drv.c
> @@ -62,6 +62,7 @@ static struct ap_driver vfio_ap_drv = {
>  	.on_config_changed = vfio_ap_on_cfg_changed,
>  	.on_scan_complete = vfio_ap_on_scan_complete,
>  	.ids = ap_queue_ids,
> +	.driver.support_driver_override = true,
>  };

[Severity: High]
Does struct device_driver have a support_driver_override member in this
tree?  Without the driver-core prerequisite adding that field to struct
device_driver in include/linux/device/driver.h, building vfio_ccw_drv.c or
vfio_ap_drv.c fails with an unknown field error.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261119051507.3306075-1-alex@shazbot.org?part=1

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] s390/vfio: Allow untainted use of driver_override
  2026-11-19  5:15   ` [PATCH] s390/vfio: " Alex Williamson
  2026-11-19  5:22     ` sashiko-bot
@ 2026-11-19 12:14     ` Anthony Krowiak
  2026-11-19 18:03       ` Uwe Kleine-König
  2026-11-19 22:55     ` kernel test robot
                       ` (2 subsequent siblings)
  4 siblings, 1 reply; 33+ messages in thread
From: Anthony Krowiak @ 2026-11-19 12:14 UTC (permalink / raw)
  To: Alex Williamson, Uwe Kleine-König
  Cc: Greg Kroah-Hartman, Jonathan Corbet, Shuah Khan, Randy Dunlap,
	Rafael J . Wysocki, Danilo Krummrich, Johan Hovold,
	Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	David Lechner, Armin Wolf, Thierry Reding, Mike Rapoport,
	Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton, Petr Mladek,
	Pnina Feder, Mete Durlu, Aaron Tomlin, Rio, Feng Tang, linux-doc,
	linux-kernel, driver-core, linux-trace-kernel, Mark Brown,
	Bjorn Helgaas, Jason Herne, Eric Farman, Matthew Rosato,
	Halil Pasic, linux-s390



On 11/19/26 12:15 AM, Alex Williamson wrote:
> The vfio_ap and vfio_ccw drivers bind devices through driver_override.
> With the introduction of the support_driver_override flag in the core
> driver struct, it's now required for drivers to declare themselves as
> driver_override compatible, otherwise driver_override bindings will be
> denied or generate a kernel taint.
> 
> Set the support_driver_override flag on the vfio_ap and vfio_ccw driver
> structs.
> 
> Cc: Tony Krowiak <akrowiak@linux.ibm.com>
> Cc: Jason Herne <jjherne@linux.ibm.com>
> Cc: Eric Farman <farman@linux.ibm.com>
> Cc: Matthew Rosato <mjrosato@linux.ibm.com>
> Cc: Halil Pasic <pasic@linux.ibm.com>
> Cc: linux-s390@vger.kernel.org
> Signed-off-by: Alex Williamson <alex@shazbot.org>
> ---
> 
> Uwe, this should complete the vfio drivers needing driver override,
> covering the s390 specific drivers.  Thanks,
> 
> Alex
> 
>   drivers/s390/cio/vfio_ccw_drv.c   | 1 +
>   drivers/s390/crypto/vfio_ap_drv.c | 1 +
>   2 files changed, 2 insertions(+)
> 
> diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c
> index 7546bd137e4e..77765cde87f7 100644
> --- a/drivers/s390/cio/vfio_ccw_drv.c
> +++ b/drivers/s390/cio/vfio_ccw_drv.c
> @@ -375,6 +375,7 @@ static struct css_driver vfio_ccw_sch_driver = {
>   	.drv = {
>   		.name = "vfio_ccw",
>   		.owner = THIS_MODULE,
> +		.support_driver_override = true,
>   	},
>   	.subchannel_type = vfio_ccw_sch_ids,
>   	.irq = vfio_ccw_sch_irq,
> diff --git a/drivers/s390/crypto/vfio_ap_drv.c b/drivers/s390/crypto/vfio_ap_drv.c
> index 8e69ed286bb9..2d47dc643269 100644
> --- a/drivers/s390/crypto/vfio_ap_drv.c
> +++ b/drivers/s390/crypto/vfio_ap_drv.c
> @@ -62,6 +62,7 @@ static struct ap_driver vfio_ap_drv = {
>   	.on_config_changed = vfio_ap_on_cfg_changed,
>   	.on_scan_complete = vfio_ap_on_scan_complete,
>   	.ids = ap_queue_ids,
> +	.driver.support_driver_override = true,

Does this really belong here? Shouldn't it be in struct ap_driver
since driver_override is supported in the AP bus?

>   };
>   
>   static void vfio_ap_matrix_dev_release(struct device *dev)


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
  2026-11-18 23:56   ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
  2026-11-19  0:09     ` sashiko-bot
  2026-11-19  0:12     ` Creeley, Brett
@ 2026-11-19 14:56     ` Mostafa Saleh
  2026-11-19 16:51     ` kernel test robot
                       ` (4 subsequent siblings)
  7 siblings, 0 replies; 33+ messages in thread
From: Mostafa Saleh @ 2026-11-19 14:56 UTC (permalink / raw)
  To: Alex Williamson
  Cc: Uwe Kleine-König, Greg Kroah-Hartman, Jonathan Corbet,
	Shuah Khan, Randy Dunlap, Rafael J . Wysocki, Danilo Krummrich,
	Johan Hovold, Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	David Lechner, Armin Wolf, Thierry Reding, Mike Rapoport,
	Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton, Petr Mladek,
	Pnina Feder, Mete Durlu, Aaron Tomlin, Rio, Feng Tang, linux-doc,
	linux-kernel, driver-core, linux-trace-kernel, Mark Brown,
	Bjorn Helgaas, Yishai Hadas, Longfang Liu, Ankit Agrawal,
	Brett Creeley, Giovanni Cabiddu, Michał Winiarski,
	Julian Ruess, Nipun Gupta, Nikhil Agarwal, Eric Auger,
	Pranjal Shrivastava, Ioana Ciornei, qat-linux, virtualization,
	intel-xe, kvm

On Wed, Nov 18, 2026 at 04:56:44PM -0700, Alex Williamson wrote:
> Driver overrides are the standard mechanism for binding vfio drivers
> to devices.  With the introduction of the support_driver_override flag
> in the core driver struct, it's now required for drivers to declare
> themselves as driver_override compatible, otherwise driver_override
> bindings will be denied or generate a kernel taint.
> 
> Set the support_driver_override flag on the driver struct across all
> vfio drivers.
> 
> Cc: Yishai Hadas <yishaih@nvidia.com>
> Cc: Longfang Liu <liulongfang@huawei.com>
> Cc: Ankit Agrawal <ankita@nvidia.com>
> Cc: Brett Creeley <brett.creeley@amd.com>
> Cc: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Julian Ruess <julianr@linux.ibm.com>
> Cc: Nipun Gupta <nipun.gupta@amd.com>
> Cc: Nikhil Agarwal <nikhil.agarwal@amd.com>
> Cc: Eric Auger <eric.auger@redhat.com>
> Cc: Mostafa Saleh <smostafa@google.com>
> Cc: Pranjal Shrivastava <praan@google.com>
> Cc: Ioana Ciornei <ioana.ciornei@nxp.com>
> Cc: qat-linux@intel.com
> Cc: virtualization@lists.linux.dev
> Cc: intel-xe@lists.freedesktop.org
> Cc: kvm@vger.kernel.org
> Signed-off-by: Alex Williamson <alex@shazbot.org>

Reviewed-by: Mostafa Saleh <smostafa@google.com>

Thanks,
Mostafa

> ---
> 
> Uwe, this should cover all the vfio drivers that expect to use
> driver_override.  Thanks,
> 
> Alex
> 
>  drivers/vfio/cdx/main.c                        | 1 +
>  drivers/vfio/fsl-mc/vfio_fsl_mc.c              | 1 +
>  drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 3 ++-
>  drivers/vfio/pci/ism/main.c                    | 3 ++-
>  drivers/vfio/pci/mlx5/main.c                   | 3 ++-
>  drivers/vfio/pci/nvgrace-gpu/main.c            | 3 ++-
>  drivers/vfio/pci/pds/pci_drv.c                 | 3 ++-
>  drivers/vfio/pci/qat/main.c                    | 3 ++-
>  drivers/vfio/pci/vfio_pci.c                    | 3 ++-
>  drivers/vfio/pci/virtio/main.c                 | 3 ++-
>  drivers/vfio/pci/xe/main.c                     | 3 ++-
>  drivers/vfio/platform/vfio_amba.c              | 1 +
>  drivers/vfio/platform/vfio_platform.c          | 1 +
>  13 files changed, 22 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/vfio/cdx/main.c b/drivers/vfio/cdx/main.c
> index 28dc8c825600..fb7679bf92fd 100644
> --- a/drivers/vfio/cdx/main.c
> +++ b/drivers/vfio/cdx/main.c
> @@ -358,6 +358,7 @@ static struct cdx_driver vfio_cdx_driver = {
>  	.match_id_table	= vfio_cdx_table,
>  	.driver	= {
>  		.name	= "vfio-cdx",
> +		.support_driver_override = true,
>  	},
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> index 15b05b8c0c90..1603f81e0257 100644
> --- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> +++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> @@ -597,6 +597,7 @@ static struct fsl_mc_driver vfio_fsl_mc_driver = {
>  	.remove		= vfio_fsl_mc_remove,
>  	.driver	= {
>  		.name	= "vfio-fsl-mc",
> +		.support_driver_override = true,
>  	},
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> index c82c59246a3f..5c56aff8db01 100644
> --- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> +++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> @@ -1737,7 +1737,8 @@ static struct pci_driver hisi_acc_vfio_pci_driver = {
>  	.id_table = hisi_acc_vfio_pci_table,
>  	.probe = hisi_acc_vfio_pci_probe,
>  	.remove = hisi_acc_vfio_pci_remove,
> -	.driver = { .pm = pm_ptr(&hisi_acc_vf_pm_ops) },
> +	.driver = { .pm = pm_ptr(&hisi_acc_vf_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &hisi_acc_vf_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/ism/main.c b/drivers/vfio/pci/ism/main.c
> index cce3bdf1f070..263b377e87c4 100644
> --- a/drivers/vfio/pci/ism/main.c
> +++ b/drivers/vfio/pci/ism/main.c
> @@ -399,7 +399,8 @@ static struct pci_driver ism_vfio_pci_driver = {
>  	.id_table = ism_device_table,
>  	.probe = ism_vfio_pci_probe,
>  	.remove = ism_vfio_pci_remove,
> -	.driver	= { .pm = pm_ptr(&ism_vfio_pm_ops) },
> +	.driver	= { .pm = pm_ptr(&ism_vfio_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &ism_vfio_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/mlx5/main.c b/drivers/vfio/pci/mlx5/main.c
> index 18a6d224b1fd..63c89e461be8 100644
> --- a/drivers/vfio/pci/mlx5/main.c
> +++ b/drivers/vfio/pci/mlx5/main.c
> @@ -1451,7 +1451,8 @@ static struct pci_driver mlx5vf_pci_driver = {
>  	.id_table = mlx5vf_pci_table,
>  	.probe = mlx5vf_pci_probe,
>  	.remove = mlx5vf_pci_remove,
> -	.driver	= { .pm = pm_ptr(&mlx5vf_pm_ops) },
> +	.driver	= { .pm = pm_ptr(&mlx5vf_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &mlx5vf_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/nvgrace-gpu/main.c b/drivers/vfio/pci/nvgrace-gpu/main.c
> index 5ddec340b73b..946da32c61ff 100644
> --- a/drivers/vfio/pci/nvgrace-gpu/main.c
> +++ b/drivers/vfio/pci/nvgrace-gpu/main.c
> @@ -1438,7 +1438,8 @@ static struct pci_driver nvgrace_gpu_vfio_pci_driver = {
>  	.id_table = nvgrace_gpu_vfio_pci_table,
>  	.probe = nvgrace_gpu_probe,
>  	.remove = nvgrace_gpu_remove,
> -	.driver = { .pm = pm_ptr(&nvgrace_gpu_pm_ops) },
> +	.driver = { .pm = pm_ptr(&nvgrace_gpu_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &nvgrace_gpu_vfio_pci_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/pds/pci_drv.c b/drivers/vfio/pci/pds/pci_drv.c
> index cf7e33d4d17b..1fcef987f1b0 100644
> --- a/drivers/vfio/pci/pds/pci_drv.c
> +++ b/drivers/vfio/pci/pds/pci_drv.c
> @@ -184,7 +184,8 @@ static struct pci_driver pds_vfio_pci_driver = {
>  	.id_table = pds_vfio_pci_table,
>  	.probe = pds_vfio_pci_probe,
>  	.remove = pds_vfio_pci_remove,
> -	.driver = { .pm = pm_ptr(&pds_vfio_pm_ops) },
> +	.driver = { .pm = pm_ptr(&pds_vfio_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &pds_vfio_pci_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/qat/main.c b/drivers/vfio/pci/qat/main.c
> index 69448fa57df4..8a616f9b6494 100644
> --- a/drivers/vfio/pci/qat/main.c
> +++ b/drivers/vfio/pci/qat/main.c
> @@ -695,7 +695,8 @@ static struct pci_driver qat_vf_vfio_pci_driver = {
>  	.id_table = qat_vf_vfio_pci_table,
>  	.probe = qat_vf_vfio_pci_probe,
>  	.remove = qat_vf_vfio_pci_remove,
> -	.driver	= { .pm = pm_ptr(&qat_vf_pm_ops) },
> +	.driver	= { .pm = pm_ptr(&qat_vf_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &qat_vf_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
> index e7c012febe91..fde2c3fc88eb 100644
> --- a/drivers/vfio/pci/vfio_pci.c
> +++ b/drivers/vfio/pci/vfio_pci.c
> @@ -260,7 +260,8 @@ static struct pci_driver vfio_pci_driver = {
>  	.remove			= vfio_pci_remove,
>  	.sriov_configure	= vfio_pci_sriov_configure,
>  	.err_handler		= &vfio_pci_err_handlers,
> -	.driver		= { .pm = pm_ptr(&vfio_pci_pm_ops) },
> +	.driver		= { .pm = pm_ptr(&vfio_pci_pm_ops),
> +			    .support_driver_override = true },
>  	.driver_managed_dma	= true,
>  };
>  
> diff --git a/drivers/vfio/pci/virtio/main.c b/drivers/vfio/pci/virtio/main.c
> index 123ff5193812..1e02a8fd4a61 100644
> --- a/drivers/vfio/pci/virtio/main.c
> +++ b/drivers/vfio/pci/virtio/main.c
> @@ -222,7 +222,8 @@ static struct pci_driver virtiovf_pci_driver = {
>  	.id_table = virtiovf_pci_table,
>  	.probe = virtiovf_pci_probe,
>  	.remove = virtiovf_pci_remove,
> -	.driver = { .pm = pm_ptr(&virtiovf_pm_ops) },
> +	.driver = { .pm = pm_ptr(&virtiovf_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &virtiovf_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/xe/main.c b/drivers/vfio/pci/xe/main.c
> index 7dab3e024aa8..e0ab61f604de 100644
> --- a/drivers/vfio/pci/xe/main.c
> +++ b/drivers/vfio/pci/xe/main.c
> @@ -592,7 +592,8 @@ static struct pci_driver xe_vfio_pci_driver = {
>  	.id_table = xe_vfio_pci_table,
>  	.probe = xe_vfio_pci_probe,
>  	.remove = xe_vfio_pci_remove,
> -	.driver = { .pm = pm_ptr(&xe_vfio_pm_ops) },
> +	.driver = { .pm = pm_ptr(&xe_vfio_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &xe_vfio_pci_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/platform/vfio_amba.c b/drivers/vfio/platform/vfio_amba.c
> index fa754f203b2d..2c87caf1b7f7 100644
> --- a/drivers/vfio/platform/vfio_amba.c
> +++ b/drivers/vfio/platform/vfio_amba.c
> @@ -137,6 +137,7 @@ static struct amba_driver vfio_amba_driver = {
>  	.id_table = vfio_amba_ids,
>  	.drv = {
>  		.name = "vfio-amba",
> +		.support_driver_override = true,
>  	},
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/platform/vfio_platform.c b/drivers/vfio/platform/vfio_platform.c
> index a4d3ace3e02d..93d06032cdde 100644
> --- a/drivers/vfio/platform/vfio_platform.c
> +++ b/drivers/vfio/platform/vfio_platform.c
> @@ -116,6 +116,7 @@ static struct platform_driver vfio_platform_driver = {
>  	.remove		= vfio_platform_remove,
>  	.driver	= {
>  		.name	= "vfio-platform",
> +		.support_driver_override = true,
>  	},
>  	.driver_managed_dma = true,
>  };
> -- 
> 2.54.0
> 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
  2026-11-18 23:56   ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
                       ` (2 preceding siblings ...)
  2026-11-19 14:56     ` Mostafa Saleh
@ 2026-11-19 16:51     ` kernel test robot
  2026-11-19 16:51     ` kernel test robot
                       ` (3 subsequent siblings)
  7 siblings, 0 replies; 33+ messages in thread
From: kernel test robot @ 2026-11-19 16:51 UTC (permalink / raw)
  To: Alex Williamson, Uwe Kleine-König
  Cc: llvm, oe-kbuild-all, Alex Williamson, Greg Kroah-Hartman,
	Jonathan Corbet, Shuah Khan, Randy Dunlap, Rafael J . Wysocki,
	Danilo Krummrich, Johan Hovold, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, David Lechner, Armin Wolf, Thierry Reding,
	Mike Rapoport, Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton,
	Linux Memory Management List, Petr Mladek, Pnina Feder,
	Mete Durlu

Hi Alex,

kernel test robot noticed the following build errors:

[auto build test ERROR on awilliam-vfio/next]
[also build test ERROR on linus/master v7.4-rc3 next-20261116]
[cannot apply to awilliam-vfio/for-linus]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Williamson/vfio-Allow-untainted-use-of-driver_override/20261118-165644
base:   https://github.com/awilliam/linux-vfio.git next
patch link:    https://lore.kernel.org/r/20261118235645.2907908-2-alex%40shazbot.org
patch subject: [PATCH] vfio: Allow untainted use of driver_override
config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20261120/202611200005.ynk0zwGb-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 3b14d7c370558b46e5f0c6494a05c492e59bf32c)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261120/202611200005.ynk0zwGb-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611200005.ynk0zwGb-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/vfio/pci/vfio_pci.c:264:9: error: field designator 'support_driver_override' does not refer to any field in type 'struct device_driver'
     264 |                             .support_driver_override = true },
         |                             ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 error generated.


vim +264 drivers/vfio/pci/vfio_pci.c

   255	
   256	static struct pci_driver vfio_pci_driver = {
   257		.name			= "vfio-pci",
   258		.id_table		= vfio_pci_table,
   259		.probe			= vfio_pci_probe,
   260		.remove			= vfio_pci_remove,
   261		.sriov_configure	= vfio_pci_sriov_configure,
   262		.err_handler		= &vfio_pci_err_handlers,
   263		.driver		= { .pm = pm_ptr(&vfio_pci_pm_ops),
 > 264				    .support_driver_override = true },
   265		.driver_managed_dma	= true,
   266	};
   267	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
  2026-11-18 23:56   ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
                       ` (3 preceding siblings ...)
  2026-11-19 16:51     ` kernel test robot
@ 2026-11-19 16:51     ` kernel test robot
  2026-11-19 17:40     ` kernel test robot
                       ` (2 subsequent siblings)
  7 siblings, 0 replies; 33+ messages in thread
From: kernel test robot @ 2026-11-19 16:51 UTC (permalink / raw)
  To: Alex Williamson, Uwe Kleine-König
  Cc: oe-kbuild-all, Alex Williamson, Greg Kroah-Hartman,
	Jonathan Corbet, Shuah Khan, Randy Dunlap, Rafael J . Wysocki,
	Danilo Krummrich, Johan Hovold, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, David Lechner, Armin Wolf, Thierry Reding,
	Mike Rapoport, Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton,
	Linux Memory Management List, Petr Mladek, Pnina Feder,
	Mete Durlu

Hi Alex,

kernel test robot noticed the following build errors:

[auto build test ERROR on awilliam-vfio/next]
[also build test ERROR on linus/master v7.4-rc3 next-20261116]
[cannot apply to awilliam-vfio/for-linus]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Williamson/vfio-Allow-untainted-use-of-driver_override/20261118-165644
base:   https://github.com/awilliam/linux-vfio.git next
patch link:    https://lore.kernel.org/r/20261118235645.2907908-2-alex%40shazbot.org
patch subject: [PATCH] vfio: Allow untainted use of driver_override
config: arm-randconfig-1000-20261119 (https://download.01.org/0day-ci/archive/20261120/202611200009.RQOE0yny-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 15.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261120/202611200009.RQOE0yny-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611200009.RQOE0yny-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/vfio/platform/vfio_platform.c:119:18: error: 'struct device_driver' has no member named 'support_driver_override'
     119 |                 .support_driver_override = true,
         |                  ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/vfio/platform/vfio_platform.c:119:44: error: initialization of 'const struct bus_type *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     119 |                 .support_driver_override = true,
         |                                            ^~~~
   drivers/vfio/platform/vfio_platform.c:119:44: note: (near initialization for 'vfio_platform_driver.driver.bus')


vim +119 drivers/vfio/platform/vfio_platform.c

   113	
   114	static struct platform_driver vfio_platform_driver = {
   115		.probe		= vfio_platform_probe,
   116		.remove		= vfio_platform_remove,
   117		.driver	= {
   118			.name	= "vfio-platform",
 > 119			.support_driver_override = true,
   120		},
   121		.driver_managed_dma = true,
   122	};
   123	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] 33+ messages in thread

* ✗ LGCI.VerificationFailed: failure for vfio: Allow untainted use of driver_override
  2026-11-18 16:22 ` Danilo Krummrich
                     ` (2 preceding siblings ...)
  2026-11-19  5:15   ` [PATCH] s390/vfio: " Alex Williamson
@ 2026-11-19 17:01   ` Patchwork
  3 siblings, 0 replies; 33+ messages in thread
From: Patchwork @ 2026-11-19 17:01 UTC (permalink / raw)
  To: Alex Williamson; +Cc: intel-xe

== Series Details ==

Series: vfio: Allow untainted use of driver_override
URL   : https://patchwork.freedesktop.org/series/179086/
State : failure

== Summary ==

Series author address 'alex@shazbot.org' is not on the allowlist, which prevents CI from being automatically triggered.
If you want CI to run for this series, ask Patchwork project owners to click 'retest' on the series in Patchwork.
Exception occurred during validation, bailing out!
Build URL: http://intel-gfx-ci-public.igk.intel.com:8080/job/xe_pw_trigger/1345712/ (on master)



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
  2026-11-18 23:56   ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
                       ` (4 preceding siblings ...)
  2026-11-19 16:51     ` kernel test robot
@ 2026-11-19 17:40     ` kernel test robot
  2026-11-19 18:36     ` Ankit Agrawal
  2026-11-20  2:17     ` Yao Yuan
  7 siblings, 0 replies; 33+ messages in thread
From: kernel test robot @ 2026-11-19 17:40 UTC (permalink / raw)
  To: Alex Williamson, Uwe Kleine-König
  Cc: oe-kbuild-all, Alex Williamson, Greg Kroah-Hartman,
	Jonathan Corbet, Shuah Khan, Randy Dunlap, Rafael J . Wysocki,
	Danilo Krummrich, Johan Hovold, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, David Lechner, Armin Wolf, Thierry Reding,
	Mike Rapoport, Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton,
	Linux Memory Management List, Petr Mladek, Pnina Feder,
	Mete Durlu

Hi Alex,

kernel test robot noticed the following build warnings:

[auto build test WARNING on awilliam-vfio/next]
[also build test WARNING on linus/master v7.4-rc3 next-20261116]
[cannot apply to awilliam-vfio/for-linus]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Williamson/vfio-Allow-untainted-use-of-driver_override/20261118-165644
base:   https://github.com/awilliam/linux-vfio.git next
patch link:    https://lore.kernel.org/r/20261118235645.2907908-2-alex%40shazbot.org
patch subject: [PATCH] vfio: Allow untainted use of driver_override
config: sparc64-randconfig-1000-20261119 (https://download.01.org/0day-ci/archive/20261120/202611200125.3szMlcTc-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261120/202611200125.3szMlcTc-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611200125.3szMlcTc-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/vfio/pci/pds/pci_drv.c:188:22: error: 'struct device_driver' has no member named 'support_driver_override'
     188 |                     .support_driver_override = true },
         |                      ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/vfio/pci/pds/pci_drv.c:188:48: warning: initialization of 'void (*)(struct device *)' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     188 |                     .support_driver_override = true },
         |                                                ^~~~
   drivers/vfio/pci/pds/pci_drv.c:188:48: note: (near initialization for 'pds_vfio_pci_driver.driver.coredump')


vim +188 drivers/vfio/pci/pds/pci_drv.c

   181	
   182	static struct pci_driver pds_vfio_pci_driver = {
   183		.name = KBUILD_MODNAME,
   184		.id_table = pds_vfio_pci_table,
   185		.probe = pds_vfio_pci_probe,
   186		.remove = pds_vfio_pci_remove,
   187		.driver = { .pm = pm_ptr(&pds_vfio_pm_ops),
 > 188			    .support_driver_override = true },
   189		.err_handler = &pds_vfio_pci_err_handlers,
   190		.driver_managed_dma = true,
   191	};
   192	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] s390/vfio: Allow untainted use of driver_override
  2026-11-19 12:14     ` Anthony Krowiak
@ 2026-11-19 18:03       ` Uwe Kleine-König
  0 siblings, 0 replies; 33+ messages in thread
From: Uwe Kleine-König @ 2026-11-19 18:03 UTC (permalink / raw)
  To: Anthony Krowiak
  Cc: Alex Williamson, Greg Kroah-Hartman, Jonathan Corbet, Shuah Khan,
	Randy Dunlap, Rafael J . Wysocki, Danilo Krummrich, Johan Hovold,
	Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	David Lechner, Armin Wolf, Thierry Reding, Mike Rapoport,
	Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton, Petr Mladek,
	Pnina Feder, Mete Durlu, Aaron Tomlin, Rio, Feng Tang, linux-doc,
	linux-kernel, driver-core, linux-trace-kernel, Mark Brown,
	Bjorn Helgaas, Jason Herne, Eric Farman, Matthew Rosato,
	Halil Pasic, linux-s390

[-- Attachment #1: Type: text/plain, Size: 858 bytes --]

Hello,

On Thu, Nov 19, 2026 at 07:14:47AM -0500, Anthony Krowiak wrote:
> On 11/19/26 12:15 AM, Alex Williamson wrote:
> > diff --git a/drivers/s390/crypto/vfio_ap_drv.c b/drivers/s390/crypto/vfio_ap_drv.c
> > index 8e69ed286bb9..2d47dc643269 100644
> > --- a/drivers/s390/crypto/vfio_ap_drv.c
> > +++ b/drivers/s390/crypto/vfio_ap_drv.c
> > @@ -62,6 +62,7 @@ static struct ap_driver vfio_ap_drv = {
> >   	.on_config_changed = vfio_ap_on_cfg_changed,
> >   	.on_scan_complete = vfio_ap_on_scan_complete,
> >   	.ids = ap_queue_ids,
> > +	.driver.support_driver_override = true,
> 
> Does this really belong here? Shouldn't it be in struct ap_driver
> since driver_override is supported in the AP bus?

ap_device_probe() calls device_match_driver_override with
drv=&ap_drv->driver. So I think the assignment is fine.

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
  2026-11-18 23:56   ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
                       ` (5 preceding siblings ...)
  2026-11-19 17:40     ` kernel test robot
@ 2026-11-19 18:36     ` Ankit Agrawal
  2026-11-20  2:17     ` Yao Yuan
  7 siblings, 0 replies; 33+ messages in thread
From: Ankit Agrawal @ 2026-11-19 18:36 UTC (permalink / raw)
  To: Alex Williamson, Uwe Kleine-König
  Cc: Greg Kroah-Hartman, Jonathan Corbet, Shuah Khan, Randy Dunlap,
	Rafael J . Wysocki, Danilo Krummrich, Johan Hovold,
	Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	David Lechner, Armin Wolf, Thierry Reding, Mike Rapoport,
	Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton, Petr Mladek,
	Pnina Feder, Mete Durlu, Aaron Tomlin, Rio, Feng Tang,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	driver-core@lists.linux.dev, linux-trace-kernel@vger.kernel.org,
	Mark Brown, Bjorn Helgaas, Yishai Hadas, Longfang Liu,
	Brett Creeley, Giovanni Cabiddu, Michał Winiarski,
	Julian Ruess, Nipun Gupta, Nikhil Agarwal, Eric Auger,
	Mostafa Saleh, Pranjal Shrivastava, Ioana Ciornei,
	qat-linux@intel.com, virtualization@lists.linux.dev,
	intel-xe@lists.freedesktop.org, kvm@vger.kernel.org

Reviewed-by: Ankit Agrawal <ankita@nvidia.com>

Thanks!

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] s390/vfio: Allow untainted use of driver_override
  2026-11-19  5:15   ` [PATCH] s390/vfio: " Alex Williamson
  2026-11-19  5:22     ` sashiko-bot
  2026-11-19 12:14     ` Anthony Krowiak
@ 2026-11-19 22:55     ` kernel test robot
  2026-11-19 23:16     ` kernel test robot
  2026-11-20  2:12     ` kernel test robot
  4 siblings, 0 replies; 33+ messages in thread
From: kernel test robot @ 2026-11-19 22:55 UTC (permalink / raw)
  To: Alex Williamson, Uwe Kleine-König
  Cc: oe-kbuild-all, Alex Williamson, Greg Kroah-Hartman,
	Jonathan Corbet, Shuah Khan, Randy Dunlap, Rafael J . Wysocki,
	Danilo Krummrich, Johan Hovold, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, David Lechner, Armin Wolf, Thierry Reding,
	Mike Rapoport, Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton,
	Linux Memory Management List, Petr Mladek, Pnina Feder,
	Mete Durlu

Hi Alex,

kernel test robot noticed the following build errors:

[auto build test ERROR on kvms390/next]
[also build test ERROR on awilliam-vfio/next soc/for-next awilliam-vfio/for-linus linus/master v7.4-rc3 next-20261116]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Williamson/s390-vfio-Allow-untainted-use-of-driver_override/20261118-221504
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git next
patch link:    https://lore.kernel.org/r/20261119051507.3306075-1-alex%40shazbot.org
patch subject: [PATCH] s390/vfio: Allow untainted use of driver_override
config: s390-randconfig-1001-20261119 (https://download.01.org/0day-ci/archive/20261120/202611200633.VVreDSbc-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 14.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261120/202611200633.VVreDSbc-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611200633.VVreDSbc-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/s390/cio/vfio_ccw_drv.c:378:18: error: 'struct device_driver' has no member named 'support_driver_override'
     378 |                 .support_driver_override = true,
         |                  ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/s390/cio/vfio_ccw_drv.c:378:44: error: initialization of 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     378 |                 .support_driver_override = true,
         |                                            ^~~~
   drivers/s390/cio/vfio_ccw_drv.c:378:44: note: (near initialization for 'vfio_ccw_sch_driver.drv.mod_name')


vim +378 drivers/s390/cio/vfio_ccw_drv.c

   373	
   374	static struct css_driver vfio_ccw_sch_driver = {
   375		.drv = {
   376			.name = "vfio_ccw",
   377			.owner = THIS_MODULE,
 > 378			.support_driver_override = true,
   379		},
   380		.subchannel_type = vfio_ccw_sch_ids,
   381		.irq = vfio_ccw_sch_irq,
   382		.probe = vfio_ccw_sch_probe,
   383		.remove = vfio_ccw_sch_remove,
   384		.shutdown = vfio_ccw_sch_shutdown,
   385		.sch_event = vfio_ccw_sch_event,
   386		.chp_event = vfio_ccw_chp_event,
   387	};
   388	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] s390/vfio: Allow untainted use of driver_override
  2026-11-19  5:15   ` [PATCH] s390/vfio: " Alex Williamson
                       ` (2 preceding siblings ...)
  2026-11-19 22:55     ` kernel test robot
@ 2026-11-19 23:16     ` kernel test robot
  2026-11-20  2:12     ` kernel test robot
  4 siblings, 0 replies; 33+ messages in thread
From: kernel test robot @ 2026-11-19 23:16 UTC (permalink / raw)
  To: Alex Williamson, Uwe Kleine-König
  Cc: oe-kbuild-all, Alex Williamson, Greg Kroah-Hartman,
	Jonathan Corbet, Shuah Khan, Randy Dunlap, Rafael J . Wysocki,
	Danilo Krummrich, Johan Hovold, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, David Lechner, Armin Wolf, Thierry Reding,
	Mike Rapoport, Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton,
	Linux Memory Management List, Petr Mladek, Pnina Feder,
	Mete Durlu

Hi Alex,

kernel test robot noticed the following build warnings:

[auto build test WARNING on kvms390/next]
[also build test WARNING on awilliam-vfio/next soc/for-next awilliam-vfio/for-linus linus/master v7.4-rc3 next-20261116]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Williamson/s390-vfio-Allow-untainted-use-of-driver_override/20261118-221504
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git next
patch link:    https://lore.kernel.org/r/20261119051507.3306075-1-alex%40shazbot.org
patch subject: [PATCH] s390/vfio: Allow untainted use of driver_override
config: s390-randconfig-1000-20261119 (https://download.01.org/0day-ci/archive/20261120/202611200615.C2fWqXpC-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261120/202611200615.C2fWqXpC-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611200615.C2fWqXpC-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/s390/cio/vfio_ccw_drv.c:378:4: error: 'struct device_driver' has no member named 'support_driver_override'
      .support_driver_override = true,
       ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/s390/cio/vfio_ccw_drv.c:378:30: warning: initialization of 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      .support_driver_override = true,
                                 ^~~~
   drivers/s390/cio/vfio_ccw_drv.c:378:30: note: (near initialization for 'vfio_ccw_sch_driver.drv.mod_name')


vim +378 drivers/s390/cio/vfio_ccw_drv.c

   373	
   374	static struct css_driver vfio_ccw_sch_driver = {
   375		.drv = {
   376			.name = "vfio_ccw",
   377			.owner = THIS_MODULE,
 > 378			.support_driver_override = true,
   379		},
   380		.subchannel_type = vfio_ccw_sch_ids,
   381		.irq = vfio_ccw_sch_irq,
   382		.probe = vfio_ccw_sch_probe,
   383		.remove = vfio_ccw_sch_remove,
   384		.shutdown = vfio_ccw_sch_shutdown,
   385		.sch_event = vfio_ccw_sch_event,
   386		.chp_event = vfio_ccw_chp_event,
   387	};
   388	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] s390/vfio: Allow untainted use of driver_override
  2026-11-19  5:15   ` [PATCH] s390/vfio: " Alex Williamson
                       ` (3 preceding siblings ...)
  2026-11-19 23:16     ` kernel test robot
@ 2026-11-20  2:12     ` kernel test robot
  4 siblings, 0 replies; 33+ messages in thread
From: kernel test robot @ 2026-11-20  2:12 UTC (permalink / raw)
  To: Alex Williamson, Uwe Kleine-König
  Cc: llvm, oe-kbuild-all, Alex Williamson, Greg Kroah-Hartman,
	Jonathan Corbet, Shuah Khan, Randy Dunlap, Rafael J . Wysocki,
	Danilo Krummrich, Johan Hovold, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, David Lechner, Armin Wolf, Thierry Reding,
	Mike Rapoport, Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton,
	Linux Memory Management List, Petr Mladek, Pnina Feder,
	Mete Durlu

Hi Alex,

kernel test robot noticed the following build errors:

[auto build test ERROR on kvms390/next]
[also build test ERROR on awilliam-vfio/next soc/for-next awilliam-vfio/for-linus linus/master v7.4-rc3 next-20261116]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Williamson/s390-vfio-Allow-untainted-use-of-driver_override/20261118-221504
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git next
patch link:    https://lore.kernel.org/r/20261119051507.3306075-1-alex%40shazbot.org
patch subject: [PATCH] s390/vfio: Allow untainted use of driver_override
config: s390-defconfig (https://download.01.org/0day-ci/archive/20261120/202611200956.drD2v0r8-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261120/202611200956.drD2v0r8-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611200956.drD2v0r8-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/s390/cio/vfio_ccw_drv.c:378:4: error: field designator 'support_driver_override' does not refer to any field in type 'struct device_driver'
     378 |                 .support_driver_override = true,
         |                 ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 error generated.
--
>> drivers/s390/crypto/vfio_ap_drv.c:65:10: error: field designator 'support_driver_override' does not refer to any field in type 'struct device_driver'
      65 |         .driver.support_driver_override = true,
         |         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 error generated.


vim +378 drivers/s390/cio/vfio_ccw_drv.c

   373	
   374	static struct css_driver vfio_ccw_sch_driver = {
   375		.drv = {
   376			.name = "vfio_ccw",
   377			.owner = THIS_MODULE,
 > 378			.support_driver_override = true,
   379		},
   380		.subchannel_type = vfio_ccw_sch_ids,
   381		.irq = vfio_ccw_sch_irq,
   382		.probe = vfio_ccw_sch_probe,
   383		.remove = vfio_ccw_sch_remove,
   384		.shutdown = vfio_ccw_sch_shutdown,
   385		.sch_event = vfio_ccw_sch_event,
   386		.chp_event = vfio_ccw_chp_event,
   387	};
   388	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
  2026-11-18 23:56   ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
                       ` (6 preceding siblings ...)
  2026-11-19 18:36     ` Ankit Agrawal
@ 2026-11-20  2:17     ` Yao Yuan
  2026-11-20 14:10       ` Uwe Kleine-König
  7 siblings, 1 reply; 33+ messages in thread
From: Yao Yuan @ 2026-11-20  2:17 UTC (permalink / raw)
  To: Alex Williamson
  Cc: Uwe Kleine-König, Greg Kroah-Hartman, Jonathan Corbet,
	Shuah Khan, Randy Dunlap, Rafael J . Wysocki, Danilo Krummrich,
	Johan Hovold, Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	David Lechner, Armin Wolf, Thierry Reding, Mike Rapoport,
	Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton, Petr Mladek,
	Pnina Feder, Mete Durlu, Aaron Tomlin, Rio, Feng Tang, linux-doc,
	linux-kernel, driver-core, linux-trace-kernel, Mark Brown,
	Bjorn Helgaas, Yishai Hadas, Longfang Liu, Ankit Agrawal,
	Brett Creeley, Giovanni Cabiddu, Michał Winiarski,
	Julian Ruess, Nipun Gupta, Nikhil Agarwal, Eric Auger,
	Mostafa Saleh, Pranjal Shrivastava, Ioana Ciornei, qat-linux,
	virtualization, intel-xe, kvm

On Wed, Nov 18, 2026 at 04:56:44PM +0800, Alex Williamson wrote:
> Driver overrides are the standard mechanism for binding vfio drivers
> to devices.  With the introduction of the support_driver_override flag
> in the core driver struct, it's now required for drivers to declare
> themselves as driver_override compatible, otherwise driver_override
> bindings will be denied or generate a kernel taint.
>

Hi Alex,

> Set the support_driver_override flag on the driver struct across all
> vfio drivers.

LGTM.

Reviewed-by: Yuan Yao <yaoyuan@linux.alibaba.com>

>
> Cc: Yishai Hadas <yishaih@nvidia.com>
> Cc: Longfang Liu <liulongfang@huawei.com>
> Cc: Ankit Agrawal <ankita@nvidia.com>
> Cc: Brett Creeley <brett.creeley@amd.com>
> Cc: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Julian Ruess <julianr@linux.ibm.com>
> Cc: Nipun Gupta <nipun.gupta@amd.com>
> Cc: Nikhil Agarwal <nikhil.agarwal@amd.com>
> Cc: Eric Auger <eric.auger@redhat.com>
> Cc: Mostafa Saleh <smostafa@google.com>
> Cc: Pranjal Shrivastava <praan@google.com>
> Cc: Ioana Ciornei <ioana.ciornei@nxp.com>
> Cc: qat-linux@intel.com
> Cc: virtualization@lists.linux.dev
> Cc: intel-xe@lists.freedesktop.org
> Cc: kvm@vger.kernel.org
> Signed-off-by: Alex Williamson <alex@shazbot.org>
> ---
>
> Uwe, this should cover all the vfio drivers that expect to use
> driver_override.  Thanks,
>
> Alex
>
>  drivers/vfio/cdx/main.c                        | 1 +
>  drivers/vfio/fsl-mc/vfio_fsl_mc.c              | 1 +
>  drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 3 ++-
>  drivers/vfio/pci/ism/main.c                    | 3 ++-
>  drivers/vfio/pci/mlx5/main.c                   | 3 ++-
>  drivers/vfio/pci/nvgrace-gpu/main.c            | 3 ++-
>  drivers/vfio/pci/pds/pci_drv.c                 | 3 ++-
>  drivers/vfio/pci/qat/main.c                    | 3 ++-
>  drivers/vfio/pci/vfio_pci.c                    | 3 ++-
>  drivers/vfio/pci/virtio/main.c                 | 3 ++-
>  drivers/vfio/pci/xe/main.c                     | 3 ++-
>  drivers/vfio/platform/vfio_amba.c              | 1 +
>  drivers/vfio/platform/vfio_platform.c          | 1 +
>  13 files changed, 22 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/vfio/cdx/main.c b/drivers/vfio/cdx/main.c
> index 28dc8c825600..fb7679bf92fd 100644
> --- a/drivers/vfio/cdx/main.c
> +++ b/drivers/vfio/cdx/main.c
> @@ -358,6 +358,7 @@ static struct cdx_driver vfio_cdx_driver = {
>  	.match_id_table	= vfio_cdx_table,
>  	.driver	= {
>  		.name	= "vfio-cdx",
> +		.support_driver_override = true,
>  	},
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> index 15b05b8c0c90..1603f81e0257 100644
> --- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> +++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
> @@ -597,6 +597,7 @@ static struct fsl_mc_driver vfio_fsl_mc_driver = {
>  	.remove		= vfio_fsl_mc_remove,
>  	.driver	= {
>  		.name	= "vfio-fsl-mc",
> +		.support_driver_override = true,
>  	},
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> index c82c59246a3f..5c56aff8db01 100644
> --- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> +++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> @@ -1737,7 +1737,8 @@ static struct pci_driver hisi_acc_vfio_pci_driver = {
>  	.id_table = hisi_acc_vfio_pci_table,
>  	.probe = hisi_acc_vfio_pci_probe,
>  	.remove = hisi_acc_vfio_pci_remove,
> -	.driver = { .pm = pm_ptr(&hisi_acc_vf_pm_ops) },
> +	.driver = { .pm = pm_ptr(&hisi_acc_vf_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &hisi_acc_vf_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/ism/main.c b/drivers/vfio/pci/ism/main.c
> index cce3bdf1f070..263b377e87c4 100644
> --- a/drivers/vfio/pci/ism/main.c
> +++ b/drivers/vfio/pci/ism/main.c
> @@ -399,7 +399,8 @@ static struct pci_driver ism_vfio_pci_driver = {
>  	.id_table = ism_device_table,
>  	.probe = ism_vfio_pci_probe,
>  	.remove = ism_vfio_pci_remove,
> -	.driver	= { .pm = pm_ptr(&ism_vfio_pm_ops) },
> +	.driver	= { .pm = pm_ptr(&ism_vfio_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &ism_vfio_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/mlx5/main.c b/drivers/vfio/pci/mlx5/main.c
> index 18a6d224b1fd..63c89e461be8 100644
> --- a/drivers/vfio/pci/mlx5/main.c
> +++ b/drivers/vfio/pci/mlx5/main.c
> @@ -1451,7 +1451,8 @@ static struct pci_driver mlx5vf_pci_driver = {
>  	.id_table = mlx5vf_pci_table,
>  	.probe = mlx5vf_pci_probe,
>  	.remove = mlx5vf_pci_remove,
> -	.driver	= { .pm = pm_ptr(&mlx5vf_pm_ops) },
> +	.driver	= { .pm = pm_ptr(&mlx5vf_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &mlx5vf_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/nvgrace-gpu/main.c b/drivers/vfio/pci/nvgrace-gpu/main.c
> index 5ddec340b73b..946da32c61ff 100644
> --- a/drivers/vfio/pci/nvgrace-gpu/main.c
> +++ b/drivers/vfio/pci/nvgrace-gpu/main.c
> @@ -1438,7 +1438,8 @@ static struct pci_driver nvgrace_gpu_vfio_pci_driver = {
>  	.id_table = nvgrace_gpu_vfio_pci_table,
>  	.probe = nvgrace_gpu_probe,
>  	.remove = nvgrace_gpu_remove,
> -	.driver = { .pm = pm_ptr(&nvgrace_gpu_pm_ops) },
> +	.driver = { .pm = pm_ptr(&nvgrace_gpu_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &nvgrace_gpu_vfio_pci_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/pds/pci_drv.c b/drivers/vfio/pci/pds/pci_drv.c
> index cf7e33d4d17b..1fcef987f1b0 100644
> --- a/drivers/vfio/pci/pds/pci_drv.c
> +++ b/drivers/vfio/pci/pds/pci_drv.c
> @@ -184,7 +184,8 @@ static struct pci_driver pds_vfio_pci_driver = {
>  	.id_table = pds_vfio_pci_table,
>  	.probe = pds_vfio_pci_probe,
>  	.remove = pds_vfio_pci_remove,
> -	.driver = { .pm = pm_ptr(&pds_vfio_pm_ops) },
> +	.driver = { .pm = pm_ptr(&pds_vfio_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &pds_vfio_pci_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/qat/main.c b/drivers/vfio/pci/qat/main.c
> index 69448fa57df4..8a616f9b6494 100644
> --- a/drivers/vfio/pci/qat/main.c
> +++ b/drivers/vfio/pci/qat/main.c
> @@ -695,7 +695,8 @@ static struct pci_driver qat_vf_vfio_pci_driver = {
>  	.id_table = qat_vf_vfio_pci_table,
>  	.probe = qat_vf_vfio_pci_probe,
>  	.remove = qat_vf_vfio_pci_remove,
> -	.driver	= { .pm = pm_ptr(&qat_vf_pm_ops) },
> +	.driver	= { .pm = pm_ptr(&qat_vf_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &qat_vf_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
> index e7c012febe91..fde2c3fc88eb 100644
> --- a/drivers/vfio/pci/vfio_pci.c
> +++ b/drivers/vfio/pci/vfio_pci.c
> @@ -260,7 +260,8 @@ static struct pci_driver vfio_pci_driver = {
>  	.remove			= vfio_pci_remove,
>  	.sriov_configure	= vfio_pci_sriov_configure,
>  	.err_handler		= &vfio_pci_err_handlers,
> -	.driver		= { .pm = pm_ptr(&vfio_pci_pm_ops) },
> +	.driver		= { .pm = pm_ptr(&vfio_pci_pm_ops),
> +			    .support_driver_override = true },
>  	.driver_managed_dma	= true,
>  };
>
> diff --git a/drivers/vfio/pci/virtio/main.c b/drivers/vfio/pci/virtio/main.c
> index 123ff5193812..1e02a8fd4a61 100644
> --- a/drivers/vfio/pci/virtio/main.c
> +++ b/drivers/vfio/pci/virtio/main.c
> @@ -222,7 +222,8 @@ static struct pci_driver virtiovf_pci_driver = {
>  	.id_table = virtiovf_pci_table,
>  	.probe = virtiovf_pci_probe,
>  	.remove = virtiovf_pci_remove,
> -	.driver = { .pm = pm_ptr(&virtiovf_pm_ops) },
> +	.driver = { .pm = pm_ptr(&virtiovf_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &virtiovf_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/pci/xe/main.c b/drivers/vfio/pci/xe/main.c
> index 7dab3e024aa8..e0ab61f604de 100644
> --- a/drivers/vfio/pci/xe/main.c
> +++ b/drivers/vfio/pci/xe/main.c
> @@ -592,7 +592,8 @@ static struct pci_driver xe_vfio_pci_driver = {
>  	.id_table = xe_vfio_pci_table,
>  	.probe = xe_vfio_pci_probe,
>  	.remove = xe_vfio_pci_remove,
> -	.driver = { .pm = pm_ptr(&xe_vfio_pm_ops) },
> +	.driver = { .pm = pm_ptr(&xe_vfio_pm_ops),
> +		    .support_driver_override = true },
>  	.err_handler = &xe_vfio_pci_err_handlers,
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/platform/vfio_amba.c b/drivers/vfio/platform/vfio_amba.c
> index fa754f203b2d..2c87caf1b7f7 100644
> --- a/drivers/vfio/platform/vfio_amba.c
> +++ b/drivers/vfio/platform/vfio_amba.c
> @@ -137,6 +137,7 @@ static struct amba_driver vfio_amba_driver = {
>  	.id_table = vfio_amba_ids,
>  	.drv = {
>  		.name = "vfio-amba",
> +		.support_driver_override = true,
>  	},
>  	.driver_managed_dma = true,
>  };
> diff --git a/drivers/vfio/platform/vfio_platform.c b/drivers/vfio/platform/vfio_platform.c
> index a4d3ace3e02d..93d06032cdde 100644
> --- a/drivers/vfio/platform/vfio_platform.c
> +++ b/drivers/vfio/platform/vfio_platform.c
> @@ -116,6 +116,7 @@ static struct platform_driver vfio_platform_driver = {
>  	.remove		= vfio_platform_remove,
>  	.driver	= {
>  		.name	= "vfio-platform",
> +		.support_driver_override = true,
>  	},
>  	.driver_managed_dma = true,
>  };
> --
> 2.54.0
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] PCI: Allow untainted driver_override for PCI stub drivers
  2026-11-18 23:56   ` [PATCH] PCI: Allow untainted driver_override for PCI stub drivers Alex Williamson
  2026-11-19  0:03     ` sashiko-bot
@ 2026-11-20  2:32     ` kernel test robot
  2026-11-20  4:20     ` kernel test robot
  2026-11-20  6:58     ` kernel test robot
  3 siblings, 0 replies; 33+ messages in thread
From: kernel test robot @ 2026-11-20  2:32 UTC (permalink / raw)
  To: Alex Williamson, Uwe Kleine-König
  Cc: oe-kbuild-all, Alex Williamson, Greg Kroah-Hartman,
	Jonathan Corbet, Shuah Khan, Randy Dunlap, Rafael J . Wysocki,
	Danilo Krummrich, Johan Hovold, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, David Lechner, Armin Wolf, Thierry Reding,
	Mike Rapoport, Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton,
	Linux Memory Management List, Petr Mladek, Pnina Feder,
	Mete Durlu

Hi Alex,

kernel test robot noticed the following build warnings:

[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus linus/master v7.4-rc3 next-20261116]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Williamson/PCI-Allow-untainted-driver_override-for-PCI-stub-drivers/20261118-165643
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link:    https://lore.kernel.org/r/20261118235645.2907908-1-alex%40shazbot.org
patch subject: [PATCH] PCI: Allow untainted driver_override for PCI stub drivers
config: s390-randconfig-1000-20261120 (https://download.01.org/0day-ci/archive/20261120/202611201053.O40xQFuN-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261120/202611201053.O40xQFuN-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611201053.O40xQFuN-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/pci/pci-pf-stub.c:39:17: error: 'struct device_driver' has no member named 'support_driver_override'
      39 |         .driver.support_driver_override = true,
         |                 ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/pci/pci-pf-stub.c:39:43: warning: initialization of 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      39 |         .driver.support_driver_override = true,
         |                                           ^~~~
   drivers/pci/pci-pf-stub.c:39:43: note: (near initialization for 'pf_stub_driver.driver.name')


vim +39 drivers/pci/pci-pf-stub.c

    33	
    34	static struct pci_driver pf_stub_driver = {
    35		.name			= "pci-pf-stub",
    36		.id_table		= pci_pf_stub_whitelist,
    37		.probe			= pci_pf_stub_probe,
    38		.sriov_configure	= pci_sriov_configure_simple,
  > 39		.driver.support_driver_override = true,
    40	};
    41	module_pci_driver(pf_stub_driver);
    42	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] PCI: Allow untainted driver_override for PCI stub drivers
  2026-11-18 23:56   ` [PATCH] PCI: Allow untainted driver_override for PCI stub drivers Alex Williamson
  2026-11-19  0:03     ` sashiko-bot
  2026-11-20  2:32     ` kernel test robot
@ 2026-11-20  4:20     ` kernel test robot
  2026-11-20  6:58     ` kernel test robot
  3 siblings, 0 replies; 33+ messages in thread
From: kernel test robot @ 2026-11-20  4:20 UTC (permalink / raw)
  To: Alex Williamson, Uwe Kleine-König
  Cc: llvm, oe-kbuild-all, Alex Williamson, Greg Kroah-Hartman,
	Jonathan Corbet, Shuah Khan, Randy Dunlap, Rafael J . Wysocki,
	Danilo Krummrich, Johan Hovold, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, David Lechner, Armin Wolf, Thierry Reding,
	Mike Rapoport, Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton,
	Linux Memory Management List, Petr Mladek, Pnina Feder,
	Mete Durlu

Hi Alex,

kernel test robot noticed the following build errors:

[auto build test ERROR on pci/next]
[also build test ERROR on pci/for-linus linus/master v7.4-rc3 next-20261116]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Williamson/PCI-Allow-untainted-driver_override-for-PCI-stub-drivers/20261118-165643
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link:    https://lore.kernel.org/r/20261118235645.2907908-1-alex%40shazbot.org
patch subject: [PATCH] PCI: Allow untainted driver_override for PCI stub drivers
config: i386-buildonly-randconfig-1003-20261120 (https://download.01.org/0day-ci/archive/20261120/202611201122.JwnDSHON-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261120/202611201122.JwnDSHON-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611201122.JwnDSHON-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/pci/pci-pf-stub.c:39:10: error: field designator 'support_driver_override' does not refer to any field in type 'struct device_driver'
      39 |         .driver.support_driver_override = true,
         |         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 error generated.


vim +39 drivers/pci/pci-pf-stub.c

    33	
    34	static struct pci_driver pf_stub_driver = {
    35		.name			= "pci-pf-stub",
    36		.id_table		= pci_pf_stub_whitelist,
    37		.probe			= pci_pf_stub_probe,
    38		.sriov_configure	= pci_sriov_configure_simple,
  > 39		.driver.support_driver_override = true,
    40	};
    41	module_pci_driver(pf_stub_driver);
    42	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] PCI: Allow untainted driver_override for PCI stub drivers
  2026-11-18 23:56   ` [PATCH] PCI: Allow untainted driver_override for PCI stub drivers Alex Williamson
                       ` (2 preceding siblings ...)
  2026-11-20  4:20     ` kernel test robot
@ 2026-11-20  6:58     ` kernel test robot
  3 siblings, 0 replies; 33+ messages in thread
From: kernel test robot @ 2026-11-20  6:58 UTC (permalink / raw)
  To: Alex Williamson, Uwe Kleine-König
  Cc: llvm, oe-kbuild-all, Alex Williamson, Greg Kroah-Hartman,
	Jonathan Corbet, Shuah Khan, Randy Dunlap, Rafael J . Wysocki,
	Danilo Krummrich, Johan Hovold, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, David Lechner, Armin Wolf, Thierry Reding,
	Mike Rapoport, Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton,
	Linux Memory Management List, Petr Mladek, Pnina Feder,
	Mete Durlu

Hi Alex,

kernel test robot noticed the following build errors:

[auto build test ERROR on pci/next]
[also build test ERROR on pci/for-linus linus/master v7.4-rc3 next-20261119]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Williamson/PCI-Allow-untainted-driver_override-for-PCI-stub-drivers/20261118-165643
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link:    https://lore.kernel.org/r/20261118235645.2907908-1-alex%40shazbot.org
patch subject: [PATCH] PCI: Allow untainted driver_override for PCI stub drivers
config: loongarch-randconfig-1000-20261120 (https://download.01.org/0day-ci/archive/20261120/202611201442.3jFAppXk-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261120/202611201442.3jFAppXk-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611201442.3jFAppXk-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/pci/pci-stub.c:40:10: error: field designator 'support_driver_override' does not refer to any field in type 'struct device_driver'
      40 |         .driver.support_driver_override = true,
         |         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 error generated.


vim +40 drivers/pci/pci-stub.c

    34	
    35	static struct pci_driver stub_driver = {
    36		.name		= "pci-stub",
    37		.id_table	= NULL,	/* only dynamic id's */
    38		.probe		= pci_stub_probe,
    39		.driver_managed_dma = true,
  > 40		.driver.support_driver_override = true,
    41	};
    42	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] PCI: Allow untainted driver_override for PCI stub drivers
@ 2026-11-20 10:35 kernel test robot
  0 siblings, 0 replies; 33+ messages in thread
From: kernel test robot @ 2026-11-20 10:35 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "too many reports for this commit"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20261118235645.2907908-1-alex@shazbot.org>
References: <20261118235645.2907908-1-alex@shazbot.org>
TO: Alex Williamson <alex@shazbot.org>
TO: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
CC: Alex Williamson <alex@shazbot.org>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
CC: Jonathan Corbet <corbet@lwn.net>
CC: Shuah Khan <skhan@linuxfoundation.org>
CC: Randy Dunlap <rdunlap@infradead.org>
CC: "Rafael J . Wysocki" <rafael@kernel.org>
CC: Danilo Krummrich <dakr@kernel.org>
CC: Johan Hovold <johan@kernel.org>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Masami Hiramatsu <mhiramat@kernel.org>
CC: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: David Lechner <dlechner@baylibre.com>
CC: Armin Wolf <W_Armin@gmx.de>
CC: Thierry Reding <thierry.reding@kernel.org>
CC: Mike Rapoport <rppt@kernel.org>
CC: Arnd Bergmann <arnd@arndb.de>
CC: Karl Mehltretter <kmehltretter@gmail.com>
CC: "Paul E . McKenney" <paulmck@kernel.org>
CC: Borislav Petkov <bp@alien8.de>
CC: Dapeng Mi <dapeng1.mi@linux.intel.com>
CC: Marco Elver <elver@google.com>
CC: "Ethan Nelson-Moore" <enelsonmoore@gmail.com>
CC: Jeff Layton <jlayton@kernel.org>
CC: Bradley Morgan <brads@mainlining.org>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
CC: Petr Mladek <pmladek@suse.com>
CC: Pnina Feder <pnina.feder@mobileye.com>
CC: Mete Durlu <meted@linux.ibm.com>

Hi Alex,

kernel test robot noticed the following build errors:

[auto build test ERROR on pci/next]
[also build test ERROR on pci/for-linus linus/master v7.4-rc3 next-20261119]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Williamson/PCI-Allow-untainted-driver_override-for-PCI-stub-drivers/20261118-165643
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link:    https://lore.kernel.org/r/20261118235645.2907908-1-alex%40shazbot.org
patch subject: [PATCH] PCI: Allow untainted driver_override for PCI stub drivers
:::::: branch date: 15 hours ago
:::::: commit date: 15 hours ago
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20261120/202611201844.f7iWPFcy-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261120/202611201844.f7iWPFcy-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202611201844.f7iWPFcy-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/pci/pci-stub.c:40:17: error: 'struct device_driver' has no member named 'support_driver_override'
      40 |         .driver.support_driver_override = true,
         |                 ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/pci/pci-stub.c:40:43: error: initialization of 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      40 |         .driver.support_driver_override = true,
         |                                           ^~~~
   drivers/pci/pci-stub.c:40:43: note: (near initialization for 'stub_driver.driver.name')
--
>> drivers/pci/pci-pf-stub.c:39:17: error: 'struct device_driver' has no member named 'support_driver_override'
      39 |         .driver.support_driver_override = true,
         |                 ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/pci/pci-pf-stub.c:39:43: error: initialization of 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      39 |         .driver.support_driver_override = true,
         |                                           ^~~~
   drivers/pci/pci-pf-stub.c:39:43: note: (near initialization for 'pf_stub_driver.driver.name')


vim +40 drivers/pci/pci-stub.c

c70e0d9dfef3d82 Chris Wright    2008-11-25  34  
c70e0d9dfef3d82 Chris Wright    2008-11-25  35  static struct pci_driver stub_driver = {
c70e0d9dfef3d82 Chris Wright    2008-11-25  36  	.name		= "pci-stub",
c70e0d9dfef3d82 Chris Wright    2008-11-25  37  	.id_table	= NULL,	/* only dynamic id's */
c70e0d9dfef3d82 Chris Wright    2008-11-25  38  	.probe		= pci_stub_probe,
18c7a349d072a22 Lu Baolu        2022-04-18  39  	.driver_managed_dma = true,
907f70ec2397402 Alex Williamson 2026-11-18 @40  	.driver.support_driver_override = true,
c70e0d9dfef3d82 Chris Wright    2008-11-25  41  };
c70e0d9dfef3d82 Chris Wright    2008-11-25  42  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] vfio: Allow untainted use of driver_override
  2026-11-20  2:17     ` Yao Yuan
@ 2026-11-20 14:10       ` Uwe Kleine-König
  0 siblings, 0 replies; 33+ messages in thread
From: Uwe Kleine-König @ 2026-11-20 14:10 UTC (permalink / raw)
  To: Yao Yuan
  Cc: Alex Williamson, Greg Kroah-Hartman, Jonathan Corbet, Shuah Khan,
	Randy Dunlap, Rafael J . Wysocki, Danilo Krummrich, Johan Hovold,
	Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
	David Lechner, Armin Wolf, Thierry Reding, Mike Rapoport,
	Arnd Bergmann, Karl Mehltretter, Paul E . McKenney,
	Borislav Petkov, Dapeng Mi, Marco Elver, Ethan Nelson-Moore,
	Jeff Layton, Bradley Morgan, Andrew Morton, Petr Mladek,
	Pnina Feder, Mete Durlu, Aaron Tomlin, Rio, Feng Tang, linux-doc,
	linux-kernel, driver-core, linux-trace-kernel, Mark Brown,
	Bjorn Helgaas, Yishai Hadas, Longfang Liu, Ankit Agrawal,
	Brett Creeley, Giovanni Cabiddu, Michał Winiarski,
	Julian Ruess, Nipun Gupta, Nikhil Agarwal, Eric Auger,
	Mostafa Saleh, Pranjal Shrivastava, Ioana Ciornei, qat-linux,
	virtualization, intel-xe, kvm

[-- Attachment #1: Type: text/plain, Size: 1136 bytes --]

On Fri, Nov 20, 2026 at 10:17:46AM +0800, Yao Yuan wrote:
> On Wed, Nov 18, 2026 at 04:56:44PM +0800, Alex Williamson wrote:
> > Driver overrides are the standard mechanism for binding vfio drivers
> > to devices.  With the introduction of the support_driver_override flag
> > in the core driver struct, it's now required for drivers to declare
> > themselves as driver_override compatible, otherwise driver_override
> > bindings will be denied or generate a kernel taint.
> >
> 
> Hi Alex,
> 
> > Set the support_driver_override flag on the driver struct across all
> > vfio drivers.
> 
> LGTM.
> 
> Reviewed-by: Yuan Yao <yaoyuan@linux.alibaba.com>

I missed your reply when I sent the next revision of this patch. I had
to trim the recipients of the v2 because gmail refused to send it with
everyone on Cc: who was emitted by get_maintainer.pl. So please see
https://lore.kernel.org/kvm/fb0df5c89336b77a373ae0f890f63427e4adbb28.1795171088.git.u.kleine-koenig@baylibre.com

But also note, that if v2 is picked up using `b4 am`, your Reviewed-by:
is considered as the patch didn't change.

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2026-11-20 14:10 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16 11:08 [PATCH] driver core: Disable driver overriding by default Uwe Kleine-König
2026-11-16 11:36 ` sashiko-bot
2026-11-16 15:48   ` Uwe Kleine-König
2026-11-18  5:51 ` Michael Kelley
2026-11-18  7:43   ` Uwe Kleine-König
2026-11-18 15:45     ` Michael Kelley
2026-11-18 16:04 ` Bradley Morgan
2026-11-18 16:22 ` Danilo Krummrich
2026-11-18 23:56   ` [PATCH] PCI: Allow untainted driver_override for PCI stub drivers Alex Williamson
2026-11-19  0:03     ` sashiko-bot
2026-11-20  2:32     ` kernel test robot
2026-11-20  4:20     ` kernel test robot
2026-11-20  6:58     ` kernel test robot
2026-11-18 23:56   ` [PATCH] vfio: Allow untainted use of driver_override Alex Williamson
2026-11-19  0:09     ` sashiko-bot
2026-11-19  0:12     ` Creeley, Brett
2026-11-19 14:56     ` Mostafa Saleh
2026-11-19 16:51     ` kernel test robot
2026-11-19 16:51     ` kernel test robot
2026-11-19 17:40     ` kernel test robot
2026-11-19 18:36     ` Ankit Agrawal
2026-11-20  2:17     ` Yao Yuan
2026-11-20 14:10       ` Uwe Kleine-König
2026-11-19  5:15   ` [PATCH] s390/vfio: " Alex Williamson
2026-11-19  5:22     ` sashiko-bot
2026-11-19 12:14     ` Anthony Krowiak
2026-11-19 18:03       ` Uwe Kleine-König
2026-11-19 22:55     ` kernel test robot
2026-11-19 23:16     ` kernel test robot
2026-11-20  2:12     ` kernel test robot
2026-11-19 17:01   ` ✗ LGCI.VerificationFailed: failure for vfio: " Patchwork
2026-11-19  3:35 ` [PATCH] driver core: Disable driver overriding by default Armin Wolf
  -- strict thread matches above, loose matches on Subject: below --
2026-11-20 10:35 [PATCH] PCI: Allow untainted driver_override for PCI stub drivers kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.