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

From
Jason Gunthorpe <jgg@ziepe.ca>
Date
2026-10-23 14:20:41
Also in
kvm, linux-coco, linux-doc, lkml
Reply to
Aneesh Kumar K.V, 2026-10-23
On Fri, Oct 23, 2026 at 01:34:53PM +0530, Aneesh Kumar K.V wrote:
CCA currently takes the device identity index during pdev_create. I am
investigating how to retrieve the certificate chains for all slots. For
now, I have implemented the sequence below.
Yeah, I think the consensus at LPC was this may be a gap in CCA.

For now I can imainge CCA just doesn't let you query the certificates,
and we'd need an ECN to correct it someday once all the kernel parts
are settled.

I broadly hope we can use the software SPDM implementation to really
flesh out the uapi and make sure that everyone is happy with it. Then
we get what subset we get from the first generation of products.

Something like if userspace can't get the slot information early it
just hardwires slot 0 and goes forward.
echo tsm0 > /sys/bus/pci/devices/$DEVICE/tsm/connect

./ctlvctl/ctlvctl --spec-dir=./specs/ exec ctlv0 device-get                                                               
# device-get, 1 fragment, generation 0                                                                                      
  device.generation 0            
  device.caps                                                                                                               
    cap.evidence                                                                                                            
      cap.min-challenge-length 0                                                                                            
      cap.max-challenge-length 0                                                                                            
      cap.max-total-output-length 369098752                                                                                 
      cap.evidence-flags evidence-accept
      cap.object                                                                                                            
        cap.blob-class cert-chain                                                                                           
        cap.blob-instance 0                                                                                                 
        cap.format spdm-cert-chain
        cap.representation raw                                                                                              
        cap.representation tcb-digest                                                                                       
        cap.hash-algo 4                                                                                                     
        cap.hash-algo 5          
        cap.hash-algo 6                                                                                                     
        cap.max-length 16777216                                                                                             
  device.info                                                                                                               
    pci.name 0000:02:00.0                       

I think we can use evidence-refresh to select the blob-instance for the
desired slot once the CCA specification supports that.
Jiri these ctlv outputs are really neat, it would be nice to include
some of them in the commit messages so people can get a sense of how
this looks without running it?
 ./ctlvctl/ctlvctl --spec-dir=./specs/ exec ctlv0 state-get                                                                
# state-get, 1 fragment, generation 0
  pci.generation 0                                                                                                          
  pci.connected 1                                                                                                           
  pci.locked 0                                                                                                              
  pci.accepted 0                 
  pci.tsm-id 0                                                                                                              
  pci.dsm 0000:02:00.0                                                                                                      

device is marked connected, but IDE is not setup as indicated by pci.accepted = 0
 
./ctlvctl/ctlvctl --spec-dir=./specs/ exec ctlv0 evidence-get --json '{
"evidence.challenge": "hex:", "evidence.object": [{
"evidence.blob-class": "cert-chain", "evidence.format":
"spdm-cert-chain", "evidence.blob-instance": 0,
"evidence.representation": "raw", "evidence.data": { "file":
"/tmp/cert0.bin", "data-buf-size": 16777216 } }] }'
# evidence-get, 1 fragment, generation 0                                                                                    
  device.generation 0                                                                                                       
  evidence.generation 1                                                                                                     
  evidence.object-length 1632           


I added the file: attribute to verify the evidence blob's contents. ie,
we can do:

# file cert0.bin  
cert0.bin: Certificate, Version=3

./ctlvctl/ctlvctl --spec-dir=./specs/ exec ctlv0 evidence-accept device.generation=0 evidence.generation=1
# acknowledged
./ctlvctl/ctlvctl --spec-dir=./specs/ exec ctlv0 state-get
# state-get, 1 fragment, generation 0
  pci.generation 0
  pci.connected 1
  pci.locked 0
  pci.accepted 1
  pci.tsm-id 0
  pci.dsm 0000:02:00.0
I believe this broadly matches what was discussed at LPC.

I really like that we can break down the steps from SPDM setup so we
can get more information to userspace to have better logging if things
go weird.

Seeing this makes me much more comfortable that CTLV is really adding
value here, these data formats are pretty complex in the end..

Thanks,
Jason
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