Re: [PATCH 17/17] PCI: Replace untrusted state with device trust

From: Jason Gunthorpe

Date: Thu Nov 05 2026 - 09:13:39 EST


On Thu, Nov 05, 2026 at 03:18:56PM +0200, Leon Romanovsky wrote:
> On Thu, Nov 05, 2026 at 08:12:51AM -0500, Greg Kroah-Hartman wrote:
> > On Thu, Nov 05, 2026 at 01:42:30PM +0200, Leon Romanovsky wrote:
> > > From: Leon Romanovsky <leonro@xxxxxxxxxx>
> > >
> > > Convert the PCI specific untrusted to use the common device trust
> > > level. Adversarial means the same thing untrusted does.
> >
> > What about for USB? Will that "move" to use this common trust level?
> > If not, I don't think it's very "common" :)
>
> It supposed to work for all buses out-of-the box, at least this is the
> intention.

You mean DISABLED/FULL should work with this patch series on USB
right? Meaning the core code will not bind a USB driver when DISABLED?

I was wondering if some of the broader things we are doing on PCIe
also apply to USB, like device authentication. I don't know alot about
USB, but I got AI to help me find some relavent spec information.

https://usb.org/authentication

This looks like the parallel to PCIe SPDM device authentication. I
would expect it to work broadly the same way as PCIe if anyone wanted
to implement it:

1) USB discovery discovers authentication support and creates an
attestation subsystem device for it
2) The struct device starts up with trust = DISABLED
3) Userspace runs the crypto flow through attestation subsystem. This
is extremely similar looking to PCIe SPDM:
1. GET_DIGESTS -> device returns a hash for each certificate chain
slot it has.
2. GET_CERTIFICATE -> device returns its certificate chain, read
in pieces.
3. CHALLENGE (nonce) -> device returns CHALLENGE_AUTH: the chain
hash, a salt, a hash of its descriptors, and a signature over the
challenge and the response.
4) Userspace inspects the above and approves the device
5) trust = FULL, driver is probed.

But I supposed Greg is asking about /sys/bus/usb/devices/DEVICE/authorized ..

Jason