Re: [PATCH RFC v2 1/9] attestation: Add the base family specification and generated files

From: Jason Gunthorpe

Date: Mon Nov 30 2026 - 15:35:51 EST


On Mon, Nov 30, 2026 at 03:00:38PM +0100, Jiri Pirko wrote:
> Nothing in this series takes a GUID. The referenced github all_2
> branch does, for now: its evidence-get carries over configfs-tsm's three
> attributes as optional request fields,
>
> service-provider?: string(1..128)
> service-guid?: binary(16)
> service-manifest-version?: uint(..u32-max)
>
> all three or none, taken only by a device whose evidence caps have
> the service flag. That is the GUID from userspace selecting an
> opaque blob that you doubt. Perhaps we can do this differently:

I would like this mess to either all be in the AMD YAML, probably
in a form like this

Or somehow more directly standardized into something actually usable
by a generic collector.

> As I understand the SVSM side, a guest under an SVSM has two
> reports. The PSP's has the challenge as REPORT_DATA. The SVSM's has
> SHA-512(challenge || manifest) there, the manifest being either the
> table of all services or one service's own, which is what the GUID
> selects. Same structure, different binding, so two formats, as you
> say.

Yeah, since the nonce calculation changes it fails my proposed test of
'can check the signature' because you can't validate the nonce without
knowing about the ||

> For a guest under an SVSM that has a vTPM, device-get would list:
>
> id class
> 0 signed the PSP's report
> 1 signed the SVSM's report over all services
> 2 auxiliary the services manifest, which 1 binds
> 3 signed the SVSM's report over the vTPM
> 4 auxiliary the vTPM's manifest, its EK public area,
> which 3 binds
> 5 cert-chain the certificate table

OK, it seems reasonable and this gets rid of the GUIDs right? We
basically hard wire a couple of the choices into the kernel and offer
them as id #?

> each with its format; the last two classes are on the branch, not
> in this series. The caller names a report and its manifest by ID in
> one evidence-get. The kernel maps GUIDs to formats and learns which
> services are there from the services manifest, so no GUID crosses
> the uAPI and a new service is a line in the kernel's table.

How does userspace understand which ID is which of the three signed
evidences? I don't think we should make ID uABI?

> For the default I'd say the objects come in the provider's order of
> preference, so generic userspace takes the first signed one whose
> format it knows. Would that do, or do you want it explicit?

That seems OK, as long as we can manage that code wise. The reason I
suggested offering a default is so the driver can have some kind of
natural order defining all the evidence it supports and not contort
itself into a specific ordering to make id 0 something particular.

> >> + # The longest the object gets; a blob this long always holds it.
> >> + max-length: uint
> >> + # A signed object's challenge lengths: each entry is one length,
> >> + # or a range from min-length to max-length.
> >> + challenge-lengths[8]?:
> >> + # A single length.
> >> + length?: uint(1..4K, bytes)
> >> + # The shortest of a range.
> >> + min-length?: uint(1..4K, bytes)
> >> + # The longest of a range.
> >> + max-length?: uint(1..4K, bytes)
> >
> >The comments should be more prescriptive on how userspace has to
> >handle this. I guess if length appears then that length must be used,
> >otherwise within the range described by min/max length
> >
> >But I wonder if this is worth some additional schema support to define
> >a tagged union?
>
> What if we just simply drop length and just have min-length and
> max-length? Then min-length==max-length is just a special case.

Makes sense to me

> >> + # Extends banks of the MR by digests, as TPM2_PCR_Extend.
> >> + mr-extend:
> >> + type: action
> >> + fd-access: read-write
> >> + optional: true
> >> + request:
> >> + # The MR to extend, by the ID mr-get lists.
> >> + id: uint(..u32-max)
> >> + # For the banks to extend, each once, in any order.
> >> + mr-values: record
> >> + reply:
> >> + mr-generation: record
> >
> >The comment should say that mr-values must include exactly every bank
> >inside the MR, not more or less.
>
> A subset is meant. v1 wanted every bank, and review of it brought up
> DRTM, which may extend only one bank while several are active:

That sounds aweful, I suppose the issue is DRTM/IMA may not have the
loadable modules for every algorithm till after the initrd starts.

But how does the verifier make any sense of this when there is a gap
in the extension? Does the TCG log include the hash algorithms that
succeeded?

> >But AMD seems to pass them through 'auxblob' in tsm_report, so there
> >should be a certificates API here to get them. SPDM also has them
> >detached from the evidence.
>
> I'd not add an op for them. An evidence object has a class, and the
> full branch adds cert-chain beside signed and event-log, so certificates
> could be listed by device-get and read by evidence-get like the log is.

OK

Jason