Re: [PATCH RFC 00/20] attestation: Add a common subsystem and TDX support
From: Jason Gunthorpe
Date: Thu Oct 29 2026 - 10:23:21 EST
On Thu, Oct 29, 2026 at 09:37:20AM +0200, Nikolay Borisov wrote:
>
>
> On 15.10.26 г. 17:50 ч., Jiri Pirko wrote:
> > From: Jiri Pirko <jiri@xxxxxxxxxx>
> >
> > Linux has several attestation interfaces tied to individual technologies.
> > That makes evidence retrieval, measurement registers, device state and
> > kernel consumers provider-specific.
> >
> > This series introduces a common attestation subsystem. Its goal is to
> > support platform, TEE and device providers through one model, including
> > TPM2, TDX, SEV-SNP, Arm CCA, FIRME, Caliptra and PCI/TSM-backed devices.
> > This first series implements the common subsystem and a TDX provider.
> > Existing native TDX tsm_mr and tsm_report interfaces remain independent.
>
> Wasn't config-tsm supposed to be this common attestation subsystem? Was this
> discussed when the initial config-tsm was proposed? Why is this coming now?
Maybe but it was far too narrowly scoped to do that. config-tsm
doesn't even include MRs, they were awkwardly pushed off into another
different spot. It just doesn't seem to meet the need, and it can't
sanely fit SPDM.
> > Attestation devices use CTLV, a schema-driven character-device TLV UAPI.
> > Compared with sysfs or configfs, CTLV executes one validated request
> > atomically instead of assembling a transaction through several files.
> > Compared with netlink, an opened device fd directly identifies authority
> > and lifetime, can be delegated normally, and owns its event queue. CTLV
> > also provides:
>
> Assuming we want to go through the route of CTLV, do we really want an
> attestation-specific interface, or most of this functionality can
> simply be
CTLV is not attestation specific..
> implemented as a specific genetlink protocol, utilising all the existing
> hardening that has gone into netlink's infrastructure to marshal messages
> from userspace to kernel space?
Been there, seems like a hard no:
https://lore.kernel.org/all/20260721182046.16219426@xxxxxxxxxx/
And then later this:
https://lore.kernel.org/all/20260921131911.532d81f4@xxxxxxxxxx/
Plus netlink being based around sockets and net namespaces is a very
poor fit for something that has nothing to do with net namespaces and
really wants a DAC security model.
> > 83 files changed, 18084 insertions(+), 28 deletions(-)
>
> That's an awful lot of code to just move certain binary blobs around
> (Judging by what config-tsm is doing ATM).
Yeah, netlink is alot of code.
ctlv is trying to solve a bigger more general problem than just
config-tsm.
Attestation is simply the first user as it has some complicated data
structure that suits it well.
Jason