driver core: Authorize device trust before driver binding
Get series with b4
b4 am [email protected] change-id 20260915-device-trust-core-12934e618489Versions newest first
- v4 Latest33 patches 1 replyIn review
- v331 patches 9 repliesSuperseded
- v219 patches 25 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 17 patches | 43 replies | Superseded |
Changes in v4 from the cover letter
- Documentation, commit messages e.t.c
- Don't fail BT device initialization if WiFI USB claim fails/
- Rename "adversary" to "adversarial" as was agreed at the beginning.
- Added new patch to drain usbfs during disconnect.
- Added another new patch to reject usbfs connect requests for
unregistered interfaces.
- Link to v3: https://patch.msgid.link/[email protected]
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/33 | wifi: mac80211_hwsim: lock device for manual driver bindingdrivers/ | +2 | 0 replies | |
| 2/33 | Bluetooth: btusb: Fix MediaTek ISO claim lockingdrivers/ | +37 | 1 reply | |
| 3/33 | USB: Lock interfaces during manual driver bindingdrivers/ drivers/ | +10 | 0 replies | |
| 4/33 | USB: serial: Register USB drivers with their owning moduledrivers/ include/ | +6 | 0 replies | |
| 5/33 | USB: Reject claims of DT-disabled interfacesdrivers/ | +3 | 0 replies | |
| 6/33 | USB: Reject usbfs connect requests for unregistered interfacesdrivers/ | +5 | 0 replies | |
| 7/33 | USB: Release interface claims according to binding statedrivers/ | +22 | 0 replies | |
| 8/33 | USB: Reject claims after interface registration failuredrivers/ drivers/ | +11 | 0 replies | |
| 9/33 | ALSA: usb-audio: Release interface claims when probe failssound/ | +7 | 0 replies | |
| 10/33 | USB: Pin modules for unregistered interface claimsdrivers/ drivers/ drivers/ +1 more | +26 | 0 replies | |
| 11/33 | USB: Add helpers to release unpublished interface claimsdrivers/ drivers/ | +29 | 0 replies | |
| 12/33 | USB: Unwind interface claims after registration or binding failuredrivers/ | +40 | 0 replies | |
| 13/33 | PNP: Attach card devices through the driver coredrivers/ | +6 | 0 replies | |
| 14/33 | cdx: Propagate DMA configuration errorsdrivers/ | +1 | 0 replies | |
| 15/33 | driver core: Report deferred probes through sysfs drivers_probeDocumentation/ MAINTAINERS drivers/ | +22 | 0 replies | |
| 16/33 | driver core: Add a compatibility API for manual driver attachmentdrivers/ drivers/ drivers/ +1 more | +134 | 0 replies | |
| 17/33 | Input: gameport - use the compatibility driver attachment APIdrivers/ | +5 | 0 replies | |
| 18/33 | Input: serio - use the compatibility driver attachment APIdrivers/ | +10 | 0 replies | |
| 19/33 | net: phy: Use the compatibility driver attachment APIdrivers/ | +14 | 0 replies | |
| 20/33 | USB: Drain usbfs when a device is unregistereddrivers/ drivers/ drivers/ | +6 | 0 replies | |
| 21/33 | driver core: Introduce a generic device trust levelDocumentation/ drivers/ drivers/ +8 more | +361 | 0 replies | |
| 22/33 | driver core: Expose device trust authorization interfacesDocumentation/ MAINTAINERS drivers/ +4 more | +186 | 0 replies | |
| 23/33 | driver core: Accept device trust policy on the kernel command lineDocumentation/ Documentation/ drivers/ +2 more | +134 | 0 replies | |
| 24/33 | driver core: Accept device trust policy by driver nameDocumentation/ Documentation/ drivers/ +1 more | +107 | 0 replies | |
| 25/33 | driver core: Expose committed device trust leveldrivers/ include/ | +14 | 0 replies | |
| 26/33 | driver core: Cover trust authorization and binding with KUnitdrivers/ drivers/ drivers/ | +2490 | 0 replies | |
| 27/33 | driver core: Document trust admission and initrd authorizationDocumentation/ Documentation/ | +324 | 0 replies | |
| 28/33 | PCI: Use device trust for platform restrictionsDocumentation/ drivers/ drivers/ +4 more | +38 | 0 replies | |
| 29/33 | iommu: Use device trust for DMA restrictionsDocumentation/ drivers/ drivers/ +4 more | +36 | 0 replies | |
| 30/33 | driver core: Allow driver attachment with the device lock helddrivers/ include/ | +31 | 0 replies | |
| 31/33 | USB: Retain the result of configuration requestsdrivers/ include/ | +13 | 0 replies | |
| 32/33 | USB: Authorize interfaces through device trustDocumentation/ Documentation/ drivers/ +4 more | +48 | 0 replies | |
| 33/33 | USB: Authorize devices through device trustDocumentation/ Documentation/ drivers/ +7 more | +98 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [PATCH v4 00/33] driver core: Authorize device trust before driver binding
Device trust policies need to precede driver setup, including manual attachment, so userspace can authorize devices before they operate.
This series introduces device trust policy, authorization, and lifetime commitment. Authorization does not reconfigure ATS capabilities or replace IOMMU domains selected during discovery and further ATS and IOMMU integration will follow in a separate series.
The table below tries to summarize the possible kernel command line options and system behavior after that:
Command line Initial behavior ---------------------------------- --------------------------------------- No device_trust options General: existing driver binding.
PCI: existing ACPI/topology
restrictions.
USB: existing authorized sysfs flow.
device_trust.default=default General: use each bus's initial policy.
PCI: keep the platform classification
and its restrictions; device rules can replace it.
USB: devices and interfaces denied by
USB defaults wait for authorization before binding.
device_trust.default=blocked General: block driver binding until
authorization.
PCI: restrict every device from
discovery; authorization does not revisit domain and ATS decisions.
USB: leave devices and interfaces
unbound until authorized.
device_trust.default=adversarial General: allow adversarial binding.
PCI: restrict every device as
adversarial.
USB: allow adversarial binding,
overriding USB authorization defaults.
device_trust.default=unrestricted General: allow unrestricted binding;
freeze trust policy changes.
PCI: replace the platform
classification; removable devices lose their DMA restrictions.
USB: authorize devices and interfaces
regardless of USB defaults.
device_trust=... General: matching rules select policy;
or device_trust.driver=... unmatched devices stay blocked.
without an explicit default PCI: rules replace the platform
classification; a device rule of default resolves to unrestricted.
USB: matching rules select device or
interface policy.
---
Changes in v4:
- Documentation, commit messages e.t.c
- Don't fail BT device initialization if WiFI USB claim fails/
- Rename "adversary" to "adversarial" as was agreed at the beginning.
- Added new patch to drain usbfs during disconnect.
- Added another new patch to reject usbfs connect requests for
unregistered interfaces.
- Link to v3: https://patch.msgid.link/[email protected]
Changes in v3:
- Rewrote all commit messages
- Split USB patches to smaller chunks
- Introduced special device attach function which works only in
untrusted mode
- Remove the special PHY -EBUSY IRQ handling.
- Clarify that further ATS and IOMMU integration follows separately.
- Link to v2: https://patch.msgid.link/[email protected]
Changes in v2:
- Replace the serio and PHY attachment conversions with device_driver_attach_unrestricted(), restricted to device_trust.default=unrestricted.
- 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/[email protected]
---
Leon Romanovsky (33):
wifi: mac80211_hwsim: lock device for manual driver binding
Bluetooth: btusb: Fix MediaTek ISO claim locking
USB: Lock interfaces during manual driver binding
USB: serial: Register USB drivers with their owning module
USB: Reject claims of DT-disabled interfaces
USB: Reject usbfs connect requests for unregistered interfaces
USB: Release interface claims according to binding state
USB: Reject claims after interface registration failure
ALSA: usb-audio: Release interface claims when probe fails
USB: Pin modules for unregistered interface claims
USB: Add helpers to release unpublished interface claims
USB: Unwind interface claims after registration or binding failure
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: gameport - use the compatibility driver attachment API
Input: serio - use the compatibility driver attachment API
net: phy: Use the compatibility driver attachment API
USB: Drain usbfs when a device is unregistered
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: Use device trust for platform restrictions
iommu: Use device trust for DMA restrictions
driver core: Allow driver attachment with the device lock held
USB: Retain the result of configuration requests
USB: Authorize interfaces through device trust
USB: Authorize devices through device trust
Documentation/ABI/testing/sysfs-bus-drivers-probe | 14 + Documentation/ABI/testing/sysfs-bus-usb | 18 + Documentation/ABI/testing/sysfs-devices-trust | 37 + Documentation/admin-guide/kernel-parameters.txt | 37 + .../driver-api/driver-model/device-trust.rst | 343 +++ Documentation/driver-api/driver-model/index.rst | 1 + Documentation/usb/authorization.rst | 37 + MAINTAINERS | 2 + drivers/base/Makefile | 2 +- drivers/base/base.h | 52 + drivers/base/bus.c | 9 +- drivers/base/core.c | 52 +- drivers/base/dd.c | 192 +- drivers/base/test/Makefile | 1 + drivers/base/test/device-trust-test.c | 2487 ++++++++++++++++++++ drivers/base/trust.c | 509 ++++ drivers/bluetooth/btusb_main.c | 55 +- drivers/cdx/cdx.c | 2 +- drivers/input/gameport/gameport.c | 22 +- drivers/input/serio/serio.c | 29 +- drivers/iommu/amd/iommu.c | 3 +- drivers/iommu/dma-iommu.c | 14 +- drivers/iommu/intel/iommu.c | 14 +- drivers/iommu/iommu.c | 9 +- drivers/net/phy/phy_device.c | 28 +- drivers/net/wireless/virtual/mac80211_hwsim_main.c | 2 + drivers/pci/ats.c | 4 +- drivers/pci/pci.c | 5 +- drivers/pci/probe.c | 18 +- drivers/pci/quirks.c | 7 +- drivers/pnp/card.c | 12 +- drivers/usb/core/devio.c | 12 +- drivers/usb/core/driver.c | 118 +- drivers/usb/core/generic.c | 2 +- drivers/usb/core/hub.c | 42 +- drivers/usb/core/message.c | 104 +- drivers/usb/core/sysfs.c | 9 +- drivers/usb/core/trace.h | 2 +- drivers/usb/core/usb.c | 6 + drivers/usb/core/usb.h | 7 +- drivers/usb/serial/usb-serial.c | 4 +- include/linux/device.h | 21 + include/linux/device/bus.h | 10 + include/linux/device/trust.h | 54 + include/linux/pci.h | 18 +- include/linux/usb.h | 25 +- include/linux/usb/serial.h | 4 +- sound/usb/card.c | 7 + 48 files changed, 4246 insertions(+), 216 deletions(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20260915-device-trust-core-12934e618489
Best regards,
Signature · 1 line
Leon Romanovsky <[email protected]>