Re: [PATCH v9 0/6] Add TDX Guest Attestation support
From: Sathyanarayanan Kuppuswamy
Date: Wed Aug 24 2022 - 14:16:17 EST
Hi,
On 8/24/22 10:12 AM, Dave Hansen wrote:
> On 7/27/22 20:44, Kuppuswamy Sathyanarayanan wrote:
>> An Intel SGX Quoting Enclave (QE), written specifically to support
>> quoting Intel TDX TDs, uses EVERIFYREPORT2, to help check the integrity
>> of the TDG.MR.REPORT. If it passes, the QE can use a certified quote
>> signing key to sign a quote containing the guest TD’s measurements and
>> the additional data being quoted.
>
> (maintainer hat firmly in place, not speaking as an Intel person here...)
>
> Let's say Intel tires of SGX and zaps it from server CPUs just like it
> did clients. Or, that Intel decides that TDX is really cool and wants
> it on SGX-free clients in addition to servers.
>
> Can the guest ABI which is introduced here work for a future attestation
> architecture that does not involve SGX?
Yes. ABI introduced here is agnostic to QE implementation. For getting a
signed Quote, the guest will pass TDREPORT with length as input and expect
signed Quote with length as output. This requirement is valid irrespective
of QE implementation(SGX/no-SGX).
As you can see below, in our ABI we pass TDREPORT with "tdx_quote_hdr" in a
buffer. Upon successful completion of the request, we expect Quote in the
same buffer with proper header details. Such header format is generic and
should work well in non-SGX environment you have mentioned as well.
Input buffer -> [tdx_quote_hdr][TDREPORT]
Output buffer -> [tdx_quote_hdr][Quote]
struct tdx_quote_hdr {
/* Quote version, filled by TD */
__u64 version;
/* Status code of Quote request, filled by VMM */
__u64 status;
/* Length of TDREPORT, filled by TD */
__u32 in_len;
/* Length of Quote, filled by VMM */
__u32 out_len;
/* Actual Quote data or TDREPORT on input */
__u64 data[0];
};
/* struct tdx_quote_req: Request to generate TD Quote using TDREPORT
*
* @buf : Pass user data that includes TDREPORT as input. Upon
* successful completion of IOCTL, output is copied
* back to the same buffer.
* @len : Length of the Quote buffer.
*/
struct tdx_quote_req {
__u64 buf; // buf with header and data
__u64 len;
};
--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer