Re: [PATCH RFC v2 9/9] attestation: Add the TDX family implementation
From: Jiri Pirko
Date: Tue Nov 24 2026 - 07:13:28 EST
Mon, Nov 23, 2026 at 04:42:48PM +0100, jarkko@xxxxxxxxxx wrote:
>On Mon, Nov 23, 2026 at 11:40:42AM -0400, Jason Gunthorpe wrote:
>> On Mon, Nov 23, 2026 at 05:24:15PM +0200, Jarkko Sakkinen wrote:
>> > > > > As per the function, perhaps tpm2_calc_event_log_size() should be
>> > > > > relocated to lib and have non-TPM name like firmware_event_log_size()
>> > > > > or something.
>> > > >
>> > > > Probably under drivers/attestation since that is where all the TCG
>> > > > formatted logs should end up. It should be 'tcg_event_log_size()' or
>> > > > something. Maybe a tiny module for it like we would have done in lib/
>> > >
>> > > +1 for the name, as it is obviously more accurate prefix.
>> >
>> > Location, I don't know. I was thinking something like "lib/tcg.c" with
>> > routines that are plain calculations based on TCG/TPM data.
>>
>> I think we should not have new users outside attestation subsystem,
>> but the legacy onces will still exist obviously..
>>
>> IDK either, but this is my guess..
>
>No strong opinions on this; just unpurging my thoughts.
Okay, will put have this in a helper lib.
>
>>
>> > And perhaps for tpm_buf (both stack/heap allocatable), if Trenchboot
>> > ever moves forward.
>>
>> DRTM users will route through attestation subsystem to do their
>> extends so the tpm_buf user would be the TPM driver inside
>> attestation. We definitely need this for ROT agility.
>>
>> We should be able to build the attestation TPM driver without any
>> trenchboot stuff to motivate it.
>
>OK, this was my guess but did not know it by fact.
>
>>
>> Jason
>
>
>Br, Jarkko