Re: [PATCH RFC 14/20] attestation: Add the base family specification and generated files

From: Jiri Pirko

Date: Thu Nov 05 2026 - 09:12:50 EST


Mon, Oct 26, 2026 at 03:07:54PM +0100, jgg@xxxxxxxxxx wrote:

[..]

>
>evidence-get:
> request:
> challenge: binary
>
>Binary, blob, raw? Lots of words for the same idea here..

binary is inline field, blob is va/memfd/dmabuf using field. I want to
keep these to "types" of TLV separate.


>
> objects[]:
> blob-class: evidence-blob-class
> format: string
> representation: evidence-representation
> data: output-blob
> reply:
> object-lengths[]: uint
> mr-generation?: uint
>
>=======
>
>mr-get:
> request:
> id: uint
> reply:
> name: string
> supported-hash-algorithms[]: uint
>
>No definition what these numbers are. They should be TCG2 defined hash
>algorithm constants I guess. Why not have an enum here for them?

it's enum hash_algo - I will make it more explicit including existing
c enums into yaml.


>
> caps: mr-caps
> register-index?: uint
>
>So we get a string and a small integer for every MR? Like PCR10 and 10
>for TPM?

Yes. The name is the platform's and the index is the hardware's number,
where it has one. TDX has mrtd without an index and rtmr0-rtmr3 with
0-3. A TPM would have pcr10 and 10.


[..]


>
>=======
>
>mr-extend:
> request:
> id: uint
> values[]:
> hash-algo: uint
> data: binary
> reply:
> generation: uint
>
>Is this extend 'you give me an exactly sized data that is a hash' or
>'you give me data and I hash it' ?
>
>TPM/etc do both, there are good reasons to have both, and the latter
>is more flexible in supporting crypto agility..

The former. I have a patch in a queue that adds the latter: mr-extend
takes either a digest per bank or the data, as an input blob, which the
kernel hashes with the algorithm of each bank, and the reply returns
the digests the banks were extended by.