Re: [PATCH RFC 00/20] attestation: Add a common subsystem and TDX support

From
Dave Jiang <dave.jiang@intel.com>
Date
2026-10-28 19:16:04
Also in
kvm, linux-coco, linux-doc, lkml
Reply to
Jason Gunthorpe, 2026-10-27

On 10/27/26 4:46 PM, Jason Gunthorpe wrote:
On Tue, Oct 27, 2026 at 04:09:19PM -0700, Dave Jiang wrote:
quoted
There are two issues for TDX Connect. One, the device info is collected at
SPDM connect (TDH.SPDM.CONNECT), not at lock. TDH.TDI.BIND only returns the
interface report. So the measurements a TD sees at lock can be from well
before the lock. To get measurements taken after the bind, the TD has to
ask the VMM for a recollection with its own nonce.
IMHO measurements taken before lock must never be made visible through
this interface, it defeats the security property of evidence within
the locked session. I would expect the guest kernel TDX driver to
prevent this.
Agreed. I'll change the guest driver so the lock asks the VMM for a
recollection with a nonce the driver picks. Each lock then costs one
recollection.
 
quoted
Second, a device may take a runtime firmware update of equal or higher SVN
while its TDIs stay locked, unless the lock sets NO_FW_UPDATE. The
TD isn't
Sure, any of the live update things are not really relevant, the
evidence can change asynchronously and without notification, so we can
just ignore the issue. If the guest opts into live update then it can
only rely on things like min svn.
makes sense
quoted
quoted
I'm a bit puzzled by this optional challenge concept, I haven't tried
to read SPDM spec yet, but it really has a way to omit the challenge
from the reply? It doesn't just replace it with 0 or something?
SPDM puts the requester's nonce in the GET_MEASUREMENTS request, and only when
the request asks for a signature. The MEASUREMENTS response always carries the
responder's own nonce, and the signature covers the request too. An unsigned
request has no nonce and gets an unsigned response.
Returning an unsigned collection seems like an interesting use case,
but why would you want to do that in the first place?
I don't have a use case for it. That was answering whether SPDM can
leave the nonce out.
quoted
The empty challenge in my provider means something else though: don't
recollect, return the evidence collected earlier. So it's less "omit the
nonce" and more "no new collection". Maybe that's better as an explicit flag
than an empty challenge?
I'm not sure 'no new collection' is an especially useful thing. Since
the kernel won't be validating the signature you still need to pass
the expected nonce from the prior collection back to userspace so it
can check it.

Is there some specific use case for this?
Getting the lock event's evidence. With the suggested lock change above, the
guest driver collects it during the lock. But the lock is a sysfs write and
returns nothing. Userspace still has to read the evidence to appraise it before
run. The device was already locked when it was collected, so the read needs no
new collection.

Userspace doesn't need the expected nonce passed back. The guest driver picks
the nonce for the lock's collection and checks it before publishing. If userspace
sends a challenge instead, that nonce is its own. The collection's nonce is in the
evidence in the GET_MEASUREMENTS request that asked for the signature.
quoted
quoted
quoted
6. tdx_attestation_test's discovery_and_construction_fields expects an
   inheritance chain of 4, but the TDX family inherits ctlv-attestation
   directly, which gives 3. In a real TDX guest it fails with
   "Expected 4 (4) == ctlv_chain_len(self->dev) (3)".
I would have naively guessed this should inherent from some SPDM family?
The TDX family is the TD's own attestation (TD report, Quote and RTMRs), with
no device or SPDM in it. In wip_attestation_all_1 it inherits ctlv-attestation
directly, so I think the test's 4 is what's stale. Jiri would know for sure.
I think TDX report/quote/rtmrs should be a different familiy from TDX device
assignment SPDM. They are completely different things.
Yes. That's how wip_attestation_all_1 has it, and the device side is the SPDM family in the POC.

DJ
Thread (212 messages) 212 messages, 15 authors, last reply 6d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help