Re: [PATCH RFC v2 3/9] attestation: Prepare provider and instance core
From: Jiri Pirko
Date: Thu Dec 03 2026 - 05:17:01 EST
Mon, Nov 30, 2026 at 09:37:38PM +0100, jgg@xxxxxxxxxx wrote:
>On Mon, Nov 30, 2026 at 03:19:54PM +0100, Jiri Pirko wrote:
>
>> After IMA is work will be posted, I'll look at finding the instance
>> through the class device instead, so there is one ID and no limit on the
>> endpoints of a parent.
>
>Yeah that makes more sense and more broadly we should have some string
>based way to identify the ROT for IMA to use, somehow. I don't know
>what that will look like but it can come in a later series.
For IMA, I have following identification in mind for now:
kernel parameter:
ima_attestation=<family>:<mr-name>
ima_attestation=<bus>/<dev>:<mr-name>
The device is named either by a family of its chain, or by the bus
and name of its parent device; the "/" tells the two apart. Exactly one
device has to match.
<mr-name> is what follows the last ":". It is either the name mr-get
lists for the MR, or the alias "ima_default", which stands for the
MR the provider marks as the one for IMA. The MR has to be
extendable.
Examples for a TDX guest, whose MRs are mrtd and rtmr0 to rtmr3:
ima_attestation=ctlv-attestation-tdx:rtmr2
ima_attestation=ctlv-attestation-tdx:ima_default
ima_attestation=misc/tdx_guest:rtmr2
A device whose parent is a PCI function, and any attestation device
on a machine that has only one:
ima_attestation=pci/0000:00:01.0:rtmr2
ima_attestation=ctlv-attestation:ima_default
MR names are unique on a device, contain no ":", and do not depend
on the order in which a provider lists its MRs, so rtmr2 is RTMR2 on
every TDX guest.