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

From: Jiri Pirko

Date: Thu Oct 29 2026 - 06:17:30 EST


Tue, Oct 27, 2026 at 07:43:04PM +0100, dave.jiang@xxxxxxxxx wrote:
>
>
>On 10/15/26 7:50 AM, Jiri Pirko wrote:
>> From: Jiri Pirko <jiri@xxxxxxxxxx>
>>

[..]


>3. Jason asked on 14/20 whether anyone needs a variable-length challenge. I
> don't think devices need a range. A plain read sends an empty challenge, and
> an SPDM GET_MEASUREMENTS nonce is "NL = 32 or 0". Your TDX provider always
> takes 64 (attestation_tdx_evidence_caps).

https://lore.kernel.org/all/auMX4kbsflE9kK3Q@FV6GYCPJ69/

>
> A device needs exactly two lengths: 0 for a plain read and 32 for a refresh.
> struct attestation_evidence_caps only holds a single min/max range. It's
> checked on every request in attestation_evidence_request_decode(), and any
> range that allows both 0 and 32 also allows everything in between.
>
> To work around that, my provider declares 0-64 and PCI/TSM rejects any length

Perhaps just omit the challenge attr in that case would be the best way?


> other than the backend's nonce size, 32 for both backends I ran. Could the
> caps give one exact challenge length instead of a range, plus a flag that
> also allows an empty challenge? A device provider would set 32 with the flag,
> and your TDX provider 64 without it.
>

[..]