From: Alexey Kardashevskiy <aik@amd.com>
To: Jason Gunthorpe <jgg@nvidia.com>,
"Reshetova, Elena" <elena.reshetova@intel.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@kernel.org>,
"Jiang, Dave" <dave.jiang@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: Wed, 18 Nov 2026 22:12:17 +1100 [thread overview]
Message-ID: <06d99ff3-3fae-47df-a27e-f2b45d8d3852@amd.com> (raw)
In-Reply-To: <20261117142027.GI2245175@nvidia.com>
On 18/11/26 01:20, Jason Gunthorpe wrote:
> On Tue, Nov 17, 2026 at 01:00:03PM +0000, Reshetova, Elena wrote:
>>> On Mon, Nov 16, 2026 at 01:38:50PM +0000, Reshetova, Elena wrote:
>>>
>>>>> 1) No easy way to get the VCA, no easy way to do capture
>>>>
>>>> My understanding is that VCA must have been included into
>>>> SPDM_DEVICE_ATTESTATION_INFO_T from the beginning, it was omitted
>>>> by mistake and we asked to fix it as Dave already pointed out.
>>>
>>> That makes some sense, but it just makes this struct bigger and
>>> worser. As I explained ot Aneesh I'd rather not have a VCA at all but
>>> the transcript that includes VCA (or is maybe only VCA) with preserved
>>> message boundary markers. Userspace can compute VCA for the purposes
>>> of the signature hash.
>>>
>>>>> 2) Wrong digests design for the guest.
>>> SPDM_DEVICE_ATTESTATION_INFO_T
>>>>> is a terrible idea since it is not grounded in any spec. The other
>>>>> two have multiple guest digests computed directly over spec
>>>>> defined objects.
>>>>>
>>>>> 3) Even if you like SPDM_DEVICE_ATTESTATION_INFO_T it includes
>>>>> TDISP_CAPABILITIES for some bad reason. Nobody else even
>>>>> exports this info from their TSM or digests it. Thus Intel would
>>>>> need unique API for the VMM to even build
>>>>> SPDM_DEVICE_ATTESTATION_INFO_T. Not nice.
>>>>
>>>> I dont think there is an expectation that there needs to be unique API
>>>> to build this structure (I think we can hide it in the tdx-specific code), but
>>>> your point below is valid: this SPDM_DEVICE_ATTESTATION_INFO_T blob
>>>> needs to end up on the guest side because only using this blob the guest
>>>> can currently verify the evidence of the SPDM connection establishment.
>>>
>>> Right.
>>>
>>> Any every other arch can build their digested data in the VMM using
>>> the standard APIs because all their digests are over standard things.
>>
>> So, yes, if we dissect this structure, then the unique fields that Intel has
>> are:
>> HEARTBEAT_PERIOD, TDISP_CAPABILITIES, TDISP_VERSION
>> (I am not listing SPDM_CAPABILITIES, this must be part of VCA)
>
> HEARTBEAT_PERIOD will come out of the transcript as a field in
> KEY_EXCHANGE_RSP
>
> SPDM_CAPABILITIES is in the VCA
>
> TDISP_VERSION is in the data from GET_INTERFACE_REPORT which needs to
> be a common API. Though this is probably the selected version not the
> offered version.
>
> Only TDSIP_CAPABILITIES is unknown to userspace. I don't know why
> anyone needs this or why it needs to be digested. Nobody else did
> this.
>
>> Here I also have a generic question: does Linux plan for the host to
>> implement heartbeat (can be very useful to understand whenever
>> the device is still alive and didnt silently terminated session) or not?
>> And if needed, how do other coco arches expose this info?
>
> I don't know. I haven't investigated this question..
>
>> TDISP_VERSION is more interesting.
>> It may be security sensitive, i.e. assuming some
>> problems later on found in existing version of TDSIP, new version is
>> released, etc. So, downgrade attack is possible from the host
>> side and the guest wont know, if vulnerable version is in use.
>
> Huh? TDX module is trusted to negotiate the TDSIP_VERSION, host has
> nothing to do with this? The selected vesion is reported in
> GET_INTERFACE_REPORT and that must be digested.
>
> AFAICT we don't need to double check the TDX modules work by seeing
> the TDISP_VERSION from earlier in the exchange.
>
>> TDISP_CAPABILITIES are harder for me to judge, but I can imagine
>> a scenario where a guest without this info can be led to believe
>> that a reason that a given TDI is not locked with certain flags is
>> because a device does not support such TDSIP capability (while
>> it does in practice). But I think it is still guest decision to either
>> accept such configuration or not regardless of what device supports.
>> I will ask around more for potential problematic scenarios.
>
> Right now I don't see a reason to even expose TDSIP_CAPABILITIES
> through the UAPI since no other arch will implement it and it isn't
> clear what it should be even used for.
>
> Again the TSM is trusted to do the TDISP negotiation, we know this was
> done right because we will attest the TSM.
>
> I don't see that we need to double check its work. None of this is
> even signed so a malfunctioning TSM or OS can simply lie in the
> report.
>
>>> So if you keep this then you have to get a uAPI 'give me the intel
>>> blob' to build your VMM with. It is not impossible but it seems
>>> unnecessary if you'd just digest the right stuff instead of a giant
>>> struct.
>>>
>>> ARM keeps several digests:
>>>
>>> protocol_data_digest = H_rmm(VCA)
>>> identity_digest = H_rmm(cert_1 || ... || cert_n)
>>> pubkey_digest = H_rmm(<public key>)
>>> meas_digest = H_rmm(GET_MEASUREMENTS || MEASUREMENTS)
>>> report_digest = H_rmm(interface_report)
>>>
>>> I'm not sure VCA is strictly necessary. pubkey_digest is because RMM
>>> does not parse x509, since TDX does it also isn't necessary.
>>
>> Per SPDM the signed GET_MEASURMENTS || MEASUREMENTS transcript
>> actually includes VCA.
>
> This is the hash of the message bodies, which don't include VCA.
>
> You need VCA to compute the signature hash which is why everyone ships
> it around.
>
>> And this is where in our original SPDM_DEVICE_ATTESTATION_INFO_T
>> struct VCA should have lived instead of being a separate structure with digest.
>> Would that be acceptable?
>
> I'm not sure what you are proposing?
>
> My concern is you have this digest over a struct that isn't a protocol
> struct, so we have to make a special API to pass your special struct.
>
> Unless we can get rid of that I don't know if I care what you put in
> the struct, but the kernel will have to break it up and your driver
> will be more complicated than it needed to be.
>
> VCA is immutable. It should be made available once and not repeated in
> every single measurement fetch.
>
>> And yes, in our case pubkey_digest is not needed.
>
> ARM's version of having the host parse the x509 is better, IMHO :)
>
>>> What you want is an API to retrive measurements for a vdevice
>>> triggered by the guest that updates the guest visisble information
>>>
>>> And another one to retrive measurements for the host pci device that
>>> doesn't change the vdevice at all.
>>
>> Ok, so let me re-iterate to make sure I got it right.
>> You want these three things:
>>
>> 1. No implicit TSM measurement collection at the time of SPDM.CONNECT
>> (inside SPDM secure session) before or after LOCK
>
> Yes. Host and VMM can manage evidence collection through the uAPI. We
> don't need to slow things down by doing collections that many use
> cases will simply discard.
>
>> 2. Guest-requested (with a guest provided nonce) measurement collection
>> that collects only SPDM signed measurement transcript (that includes VCA)
>> and not certificates.
>> This collection refreshes the guest-visible digest of the SPDM signed measurement
>> transcript.
>
> Yes, certificates should be fixed during the plaintext setup
> sequence. We don't need to refresh them, or at least if we ever do
> want to refresh them that is some other independent activity from
> evidence collection.
>
> IMHO devices that change their GET_DIGESTS output while a SPDM
> connection is active are broken.
>
>> The purpose of this collection is for guest to obtain fresh device measurements
>> after the lock in trusted way.
>
> Yes.
>
>> 3. Host-requested (with a host provided nonce? I would rather not, because
>> it feels we need a clear way to distinguish collection 2 and 3, so I would keep
>> nonce fixed to zero in this case or any other fixed pattern)
>
> No good, it must be a host provide nonce. This is a host evidence
> collection and it must have a fresh nonce to have any security. If
> everything uses the same nonce it can be replayed.
>
> Collection 2 and 3 are the same action. Anyone who can make
> measurements can provide the nonce and generate a replayed nonce. The
> only difference is if the vdevice digests are changed.
>
> I don't see a reason to tag them, the mechanisms we have in userspace
> to ensure the nonce is legit and bound to the VM are sufficient.
>
>> measurement collection that collects only SPDM signed measurement
>> transcript (that includes VCA) and not certificates. This
>> collection does not refresh the guest-visible digest of the SPDM
>> signed measurement transcript.
>
> Yes
>
>> The purpose of this collection is to allow host to discover device measurements
>> by itself and potentially make its own independent security decision like
>> it would do for native SPDM case (without TEE-IO) where host is a decision
>> maker.
>
> Yes
>
>> Btw, does any other arch provide #3 today? I am not able to see this in ARM
>> spec at least.
>
> It is coming, currently ARM doesn't even allow the host to see the
> measurements *at all* which is a really big miss on their part.
>
> AMD is probably broken the same way as TDX is right now from what I
> can tell.
The PSP always takes nonce in DEV_MEASUREMENTS and updates the digest. Nonce comes from the initiator, the updated digest is reported back to the guest via encrypted VM<->PSP GuestRequest mechanism.
> You probably also want
>
> 4. TSM controlled nonce
>
> A way to put the vdevice into "tsm controlled nonce" where the vdevice
> evidence collection no longer accepts a guest nonce and the TSM
> provides its own random one. This would be a permanent choice when the
> vdevice is created.
Is this any better that the initiator's nonce? Thanks,
> You may also want a way for #3 to run as "tsm controlled nonce" and
> set the initial digest for all future vdevices. I'm not really sure I
> understand how this "single collection" flow is supposed to work
> though to be sure.
>
> Jason
--
Alexey
next prev parent reply other threads:[~2026-11-18 11:12 UTC|newest]
Thread overview: 117+ 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-18 11:12 ` Alexey Kardashevskiy
2026-11-10 1:40 ` Alistair
2026-11-10 15:07 ` Jason Gunthorpe
2026-11-17 23:12 ` Alistair Francis
2026-11-18 0:33 ` 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 14:20 ` Jason Gunthorpe
2026-11-18 11:12 ` Alexey Kardashevskiy [this message]
2026-11-17 11:17 ` Alexey Kardashevskiy
2026-11-17 13:28 ` Jason Gunthorpe
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=06d99ff3-3fae-47df-a27e-f2b45d8d3852@amd.com \
--to=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=jgg@nvidia.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