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

From
Jason Gunthorpe <jgg@ziepe.ca>
Date
2026-10-27 23:47:01
Also in
kvm, linux-coco, linux-doc, lkml
Reply to
Dave Jiang, 2026-10-27
On Tue, Oct 27, 2026 at 04:09:19PM -0700, Dave Jiang wrote:
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.
 
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.
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?
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?
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.

Jason
Thread (212 messages) 212 messages, 15 authors, last reply 5d 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