[PATCH v2 00/19] driver core: Authorize device trust before driver binding

From: Leon Romanovsky

Date: Mon Nov 09 2026 - 02:35:04 EST


Device trust policies need to precede driver setup, including manual
attachment, so userspace can authorize devices before they operate.

Introduce disabled, adversary and full policies with boot-time selection,
sysfs authorization and lifetime commitment. Apply them to PCI and USB.
Keep serio and generic PHY attachment under their existing subsystem
locks through an API restricted to device_trust.default=full. Freeze
runtime policy changes in that mode and require per-device boot entries
to exclude driver rules from manual attachment.

Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxx>
---
Changes in v2:
- Replace the serio and PHY attachment conversions with
device_driver_attach_full(), restricted to device_trust.default=full.
- Add USB authorization on top of device trust: export
device_trust_set_policy() and convert the USB authorized attributes.
- Documentation and commit messages fixes
- Small USB patches rewrote and split
- Link to v1: https://patch.msgid.link/20261105-device-trust-core-v1-0-1e536825b4eb@xxxxxxxxxx

---
Leon Romanovsky (19):
Input: gameport - attach manual drivers through the driver core
wifi: mac80211_hwsim: lock device for manual driver binding
USB: Lock registered interfaces during manual driver binding
USB: Release interface claims refused during registration
PNP: Attach card devices through the driver core
cdx: Propagate DMA configuration errors
driver core: Report deferred probes through sysfs drivers_probe
driver core: Add a compatibility API for manual driver attachment
Input: serio - use the compatibility driver attachment API
net: phy: Use the compatibility driver attachment API
driver core: Introduce a generic device trust level
driver core: Expose device trust authorization interfaces
driver core: Accept device trust policy on the kernel command line
driver core: Accept device trust policy by driver name
driver core: Expose committed device trust level
driver core: Cover trust authorization and binding with KUnit
driver core: Document trust admission and initrd authorization
PCI: Replace untrusted state with device trust
USB: Authorize devices and interfaces through device trust

Documentation/ABI/testing/sysfs-bus-drivers-probe | 13 +
Documentation/ABI/testing/sysfs-bus-usb | 11 +
Documentation/ABI/testing/sysfs-devices-trust | 33 +
Documentation/admin-guide/kernel-parameters.txt | 29 +
.../driver-api/driver-model/device-trust.rst | 289 ++++
Documentation/driver-api/driver-model/index.rst | 1 +
Documentation/usb/authorization.rst | 20 +
MAINTAINERS | 2 +
drivers/base/Makefile | 2 +-
drivers/base/base.h | 31 +
drivers/base/bus.c | 9 +-
drivers/base/core.c | 18 +-
drivers/base/dd.c | 108 +-
drivers/base/test/Makefile | 1 +
drivers/base/test/device-trust-test.c | 1720 ++++++++++++++++++++
drivers/base/trust.c | 406 +++++
drivers/bluetooth/btusb_main.c | 42 +-
drivers/cdx/cdx.c | 2 +-
drivers/input/gameport/gameport.c | 21 +-
drivers/input/serio/serio.c | 24 +-
drivers/iommu/amd/iommu.c | 3 +-
drivers/iommu/dma-iommu.c | 14 +-
drivers/iommu/intel/iommu.c | 17 +-
drivers/iommu/iommu.c | 17 +-
drivers/net/phy/phy_device.c | 29 +-
drivers/net/wireless/virtual/mac80211_hwsim_main.c | 2 +
drivers/pci/ats.c | 4 +-
drivers/pci/pci.c | 5 +-
drivers/pci/probe.c | 23 +-
drivers/pci/quirks.c | 7 +-
drivers/pnp/card.c | 12 +-
drivers/usb/core/driver.c | 29 +-
drivers/usb/core/generic.c | 2 +-
drivers/usb/core/hub.c | 17 +-
drivers/usb/core/message.c | 34 +-
drivers/usb/core/sysfs.c | 9 +-
drivers/usb/core/trace.h | 2 +-
drivers/usb/core/usb.c | 5 +-
drivers/usb/core/usb.h | 4 +-
include/linux/device.h | 20 +
include/linux/device/bus.h | 10 +
include/linux/device/trust.h | 47 +
include/linux/pci.h | 30 +-
include/linux/usb.h | 29 +-
44 files changed, 2988 insertions(+), 165 deletions(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20260915-device-trust-core-12934e618489

Best regards,
--
Leon Romanovsky <leonro@xxxxxxxxxx>