From: Jason Gunthorpe <jgg@nvidia.com>
To: Alexey Kardashevskiy <aik@amd.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@kernel.org>,
Dave Jiang <dave.jiang@intel.com>,
"Reshetova, Elena" <elena.reshetova@intel.com>,
Xu Yilun <yilun.xu@linux.intel.com>,
"linux-coco@lists.linux.dev" <linux-coco@lists.linux.dev>,
Jiri Pirko <jiri@resnulli.us>,
"Tian, Kevin" <kevin.tian@intel.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Steven Price <steven.price@arm.com>,
Kiryl Shutsemau <kas@kernel.org>,
"Edgecombe, Rick P" <rick.p.edgecombe@intel.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Jonathan Cameron <jic23@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Ashish Kalra <ashish.kalra@amd.com>,
Tom Lendacky <thomas.lendacky@amd.com>,
John Allen <john.allen@amd.com>, Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
"patches@lists.linux.dev" <patches@lists.linux.dev>,
Alistair <alistair23@gmail.com>
Subject: Re: [RFC PATCH v1 10/11] virt: coco: arm-cca-host: Publish slot zero and establish streams after acceptance
Date: Tue, 17 Nov 2026 09:28:43 -0400 [thread overview]
Message-ID: <20261117132843.GH2245175@nvidia.com> (raw)
In-Reply-To: <53ab900a-8a6d-49e8-ac69-3b2d1130b2db@amd.com>
On Tue, Nov 17, 2026 at 10:17:14PM +1100, Alexey Kardashevskiy wrote:
> > Userspace gets to see KEY_EXCHANGE which means the verifier can prove
> > the certificate binding, this is the ONLY way to let the verifier do
> > this proof if it wants.
>
> Say, the guest userspace can see the certificate chain and the
> measurements signed with the key from slotidX used for the
> session. The PSP promised it is the same slotid. Which part does
> this verifier not trust?
In 1.2 there is only one device public key so all PSP knows is that
the public key that signed the key exchange is the same public key
that signed the measurement. It doesn't know what certificate chains
are actually in the HW for the same reasons nobody else knows.
Further, from a verifier perspective we don't have any crypto evidence
that the PSP was involved in this process, and we don't have any
crypto evidence that the certificate chain was bound to the device. It
is not optimal.
> > Further with capture we have a nice primitive to pause and do slot
> > selection before going to KEY_EXCHANGE. If we know the kernel has
> > capture then the ideal FW design for 1.3 multikey is much simpler and
> > clearer (more like ARM).
>
> No CHALLENGE, then we read digests and certificates before
> KEY_EXHANGE so the digests won't come signed and you stated before
> you wanted them signed. I am confused.
Without challenge you can get a weaker version of signing by fetching
GET_DIGESTS again after KEY_EXCHANGE inside the encrypted session. If
it is the same as the plaintext fetch then succeed KEY_EXCHANGE.
At least in 1.2 there is only one key and slot slection doesn't effect
it. So you end up with the 2nd GET_DIGESTS indirectly signed because
it is in the symmetric stream.
This is inferior to CHALLENGE or 1.3 multikey since there is no
evidence of GET_DIGESTS binding in the transcript, but as part of a
compatibility option so 1.2 can have the same flow as 1.3 it would be
helpful.
> > 1) The uAPI presents a transcript interface, every message and reply
> > individually presented to userspace. Perfectly future extensible to
> > include GET_DIGESTS with 1.3 and whatever else comes down the road.
> > These are consistent spec defined message blobs 100% the same for
> > every single SPDM implementation and TSM.
> > The kernel will start with a partial transcript, but the API
> > can carry a full one as we improve with no uAPI change.
> > The guest will see partial transcript until/if vmm/guest changes
> > are made
> >
> > 2) The uAPI presents the x509 certificate chains in a consistent spec
> > defined way that userspace can hash back to GET_DIGESTS
> >
> > 3) The uAPI presents the signed measurement result and tdisp in
> > a consistent spec defined way
> >
> > 4) We have the four step
> > Start
> > Get certificate
> > Finish using slot
>
> I am trying to think of a simple DEV_CONNECT modification.
You'll have to do the full picture to support 1.3, I don't see a
reason to do a half job right now. See my answer to Aneesh.
> Then, if the userspace wanted another slotid - run
> DEV_CONNECT(slotidY). Slow but simple.
Oh? Since you setup IDE during DEV_CONNECT I'm surprised you can tear
it down and reconnect it? I thought there were significant spec issues
with resetting IDE?
Anyhow, assuming this somehow works for you and interoperates with
other devices, userspace would have to do it and you won't be able to
present the same interface as better drivers. Start -> Finish has to
be under a single SPDM session protected by one signed transcript. You
can't split it into two sessions and still have things make any sense
from an API perspective.
> The AI tells me we cannot change the slot in SPDM (1.2 or 1.3) after
> KEY_EXCHANGE which means restarting the SPDM session so we cannot
> just change the key on the go, right?
The slot isn't used in 1.2 once the connection is up. I guess this is
correct in the sense you can't change the key being used, but in 1.3
you can get the measurement signed by different slots and thus keys.
But without establishing a GET_DIGESTS binding this is not a good
idea. Part of the reason we want to ensure the verifier sees the
GET_DIGEST binding is so we could use a different slot for
GET_MEASUREMENTS and the verifier can tell the cert chain is still
bound to the connection. Especially for auditing after booting when we
can no longer trust that the OS is not lying.
> > Accept
>
> I keep missing the point of doing this on the host (in the TDISP or
> CMA case). The host "accepts" a PF by enabling IOMMU for that PF,
> not the PSP's (==TSM) job.
This is the standard SPDM flow. You do all the measurements then you
ack back to the kernel that they are OK so can it should proceed to
the next security step.
For IDE I can't think of any strong reason why it *has* to be setup
after accept, but since other CPUs have split things up then they
should get the right flow. Not doing IDE setup during accept means you
are committed to and stuck in IDE mode during finish, which is not
really the intended API design. See above.
However for something like NVMe OPAL key release we *must* have accept
and it *must* gate sending the media decryption keys. Pretty much
every other use of SPDM will have some step that follows accept that
we don't want to happen before.
Remember this is intended to be a general interface for all SPDM use
cases in the kernel.
> > Except for Intel all the guest defined digests can be calculated
> > from the common spec messages. Well, maybe AMD has an issue, their
> > spec is too vauge to tell exactly what bytes are digested.
>
> True, I asked for some clarifications there recently, the new SEV
> TIO spec update is on its way. Thanks,
Hopefully they choose to digest the right things :\
Jason
next prev parent reply other threads:[~2026-11-17 13:28 UTC|newest]
Thread overview: 112+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 15:26 [RFC PATCH v1 00/11] PCI/TSM: Add CTLV attestation Aneesh Kumar K.V (Arm)
2026-10-28 15:26 ` [RFC PATCH v1 01/11] attestation: Restrict inherited operations per instance Aneesh Kumar K.V (Arm)
2026-10-30 13:29 ` Jiri Pirko
2026-10-28 15:26 ` [RFC PATCH v1 02/11] attestation: Filter evidence objects " Aneesh Kumar K.V (Arm)
2026-10-30 13:44 ` Jiri Pirko
2026-10-31 6:24 ` Aneesh Kumar K.V
2026-11-02 19:14 ` Jiri Pirko
2026-10-28 15:26 ` [RFC PATCH v1 03/11] attestation: Enter secure operation when evidence is accepted Aneesh Kumar K.V (Arm)
2026-10-30 13:51 ` Jiri Pirko
2026-10-30 15:36 ` Jason Gunthorpe
2026-10-31 4:09 ` Aneesh Kumar K.V
2026-11-02 11:28 ` Jiri Pirko
2026-10-28 15:26 ` [RFC PATCH v1 04/11] attestation: Bind object selection to accepted evidence snapshots Aneesh Kumar K.V (Arm)
2026-10-28 15:26 ` [RFC PATCH v1 05/11] attestation: Make the evidence-get challenge attribute optional Aneesh Kumar K.V (Arm)
2026-10-28 15:26 ` [RFC PATCH v1 06/11] PCI/TSM: Describe the PCI attestation control family Aneesh Kumar K.V (Arm)
2026-10-30 14:01 ` Jiri Pirko
2026-10-30 15:43 ` Jason Gunthorpe
2026-11-02 12:45 ` Jiri Pirko
2026-11-03 15:45 ` Jason Gunthorpe
2026-11-04 9:21 ` Jiri Pirko
2026-11-04 14:00 ` Jason Gunthorpe
2026-10-31 4:05 ` Aneesh Kumar K.V
2026-11-02 11:50 ` Jiri Pirko
2026-11-03 15:35 ` Jason Gunthorpe
2026-10-31 4:22 ` Aneesh Kumar K.V
2026-11-02 11:30 ` Jiri Pirko
2026-11-03 15:39 ` Jason Gunthorpe
2026-10-28 15:26 ` [RFC PATCH v1 07/11] attestation: Add attestation helpers for PCI/TSM integration Aneesh Kumar K.V (Arm)
2026-10-28 15:26 ` [RFC PATCH v1 08/11] PCI/TSM: Bind CTLV attestation to connected and locked contexts Aneesh Kumar K.V (Arm)
2026-10-28 22:56 ` Dave Jiang
2026-10-29 5:30 ` Aneesh Kumar K.V
2026-10-29 12:41 ` Jason Gunthorpe
2026-10-30 14:04 ` Jiri Pirko
2026-10-30 14:08 ` Jiri Pirko
2026-10-30 15:39 ` Jason Gunthorpe
2026-11-02 12:11 ` Jiri Pirko
2026-11-03 15:41 ` Jason Gunthorpe
2026-10-28 15:26 ` [RFC PATCH v1 09/11] crypto/ccp: Defer SEV-TIO link setup until evidence acceptance Aneesh Kumar K.V (Arm)
2026-11-06 7:47 ` Alexey Kardashevskiy
2026-11-06 13:14 ` Aneesh Kumar K.V
2026-11-06 14:21 ` Jason Gunthorpe
2026-11-09 10:03 ` Alexey Kardashevskiy
2026-11-12 6:23 ` Aneesh Kumar K.V
2026-10-28 15:26 ` [RFC PATCH v1 10/11] virt: coco: arm-cca-host: Publish slot zero and establish streams after acceptance Aneesh Kumar K.V (Arm)
2026-10-29 16:56 ` Dave Jiang
2026-10-29 17:10 ` Jason Gunthorpe
2026-10-30 9:58 ` Reshetova, Elena
2026-10-30 13:15 ` Jason Gunthorpe
2026-10-31 3:47 ` Aneesh Kumar K.V
2026-11-02 10:11 ` Reshetova, Elena
2026-11-02 17:26 ` Jason Gunthorpe
2026-11-03 12:01 ` Reshetova, Elena
2026-11-03 15:16 ` Jason Gunthorpe
2026-11-04 8:03 ` Xu Yilun
2026-11-04 9:49 ` Reshetova, Elena
2026-11-04 13:41 ` Jason Gunthorpe
2026-11-04 16:54 ` Dave Jiang
2026-11-06 15:53 ` Dave Jiang
2026-11-06 19:30 ` Jason Gunthorpe
2026-11-06 22:39 ` Dave Jiang
2026-11-08 18:33 ` Jason Gunthorpe
2026-11-09 10:55 ` Reshetova, Elena
2026-11-09 13:47 ` Jason Gunthorpe
2026-11-09 17:37 ` Dave Jiang
2026-11-09 18:53 ` Jason Gunthorpe
2026-11-09 20:54 ` Dave Jiang
2026-11-09 23:40 ` Jason Gunthorpe
2026-11-10 13:15 ` Reshetova, Elena
2026-11-10 14:20 ` Jason Gunthorpe
2026-11-11 13:09 ` Reshetova, Elena
2026-11-11 14:13 ` Jason Gunthorpe
2026-11-12 1:48 ` Alexey Kardashevskiy
2026-11-12 12:31 ` Jason Gunthorpe
2026-11-17 0:48 ` Alexey Kardashevskiy
2026-11-17 1:18 ` Jason Gunthorpe
2026-11-10 1:40 ` Alistair
2026-11-10 15:07 ` Jason Gunthorpe
2026-11-10 5:32 ` Alexey Kardashevskiy
2026-11-10 12:52 ` Jason Gunthorpe
2026-11-11 9:03 ` Alexey Kardashevskiy
2026-11-12 9:37 ` Aneesh Kumar K.V
2026-11-12 14:52 ` Jason Gunthorpe
2026-11-12 15:47 ` Dave Jiang
2026-11-12 16:37 ` Jason Gunthorpe
2026-11-13 8:54 ` Aneesh Kumar K.V
2026-11-13 14:52 ` Jason Gunthorpe
2026-11-13 16:29 ` Aneesh Kumar K.V
2026-11-13 19:06 ` Jason Gunthorpe
2026-11-13 16:38 ` Aneesh Kumar K.V
2026-11-13 19:12 ` Jason Gunthorpe
2026-11-13 17:12 ` Aneesh Kumar K.V
2026-11-13 19:34 ` Jason Gunthorpe
2026-11-16 13:38 ` Reshetova, Elena
2026-11-16 14:33 ` Jason Gunthorpe
2026-11-17 13:00 ` Reshetova, Elena
2026-11-17 11:17 ` Alexey Kardashevskiy
2026-11-17 13:28 ` Jason Gunthorpe [this message]
2026-11-10 20:07 ` Jason Gunthorpe
2026-11-04 9:03 ` Reshetova, Elena
2026-11-04 13:48 ` Jason Gunthorpe
2026-11-06 8:24 ` Aneesh Kumar K.V
2026-11-06 12:49 ` Reshetova, Elena
2026-11-06 15:53 ` Aneesh Kumar K.V
2026-11-06 18:54 ` Jason Gunthorpe
2026-11-03 16:31 ` Aneesh Kumar K.V
2026-11-03 17:56 ` Jason Gunthorpe
2026-11-02 10:05 ` Reshetova, Elena
2026-11-02 10:22 ` Reshetova, Elena
2026-11-02 17:37 ` Jason Gunthorpe
2026-10-28 15:26 ` [RFC PATCH v1 11/11] virt: coco: arm-cca-guest: Refresh selected evidence against trusted digests Aneesh Kumar K.V (Arm)
2026-10-30 12:34 ` [RFC PATCH v1 00/11] PCI/TSM: Add CTLV attestation Xu Yilun
2026-10-30 15:32 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261117132843.GH2245175@nvidia.com \
--to=jgg@nvidia.com \
--cc=aik@amd.com \
--cc=alistair23@gmail.com \
--cc=aneesh.kumar@kernel.org \
--cc=ashish.kalra@amd.com \
--cc=bhelgaas@google.com \
--cc=catalin.marinas@arm.com \
--cc=dave.hansen@linux.intel.com \
--cc=dave.jiang@intel.com \
--cc=elena.reshetova@intel.com \
--cc=jic23@kernel.org \
--cc=jiri@resnulli.us \
--cc=john.allen@amd.com \
--cc=kas@kernel.org \
--cc=kevin.tian@intel.com \
--cc=linux-coco@lists.linux.dev \
--cc=mark.rutland@arm.com \
--cc=patches@lists.linux.dev \
--cc=rick.p.edgecombe@intel.com \
--cc=steven.price@arm.com \
--cc=suzuki.poulose@arm.com \
--cc=thomas.lendacky@amd.com \
--cc=will@kernel.org \
--cc=yilun.xu@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox