Re: [RFC v3 00/27] lib: Rust implementation of SPDM

From: Alistair Francis

Date: Fri Apr 17 2026 - 01:22:25 EST


On Fri, Apr 17, 2026 at 2:34 PM Lukas Wunner <lukas@xxxxxxxxx> wrote:
>
> On Thu, Apr 16, 2026 at 07:35:44PM -0700, Dan Williams wrote:
> > Later in the thread I proposed an alternative that instead of supporting
> > 2 flavors of uapi through "authenticated", instead implement CMA as
> > another TSM driver [1].
> >
> > [1]: http://lore.kernel.org/69976d7d39c60_2f4a1009@dwillia2-mobl4.notmuch
>
> Please keep in mind though that CMA is just the PCIe adaption of SPDM,
> SPDM is not only needed for PCIe but also SCSI, ATA and possibly others
> and so implementing CMA as a TSM driver must not preclude use of SPDM
> in other subsystems.

That should be fine as the current SPDM implementation is
self-contained, but thanks for raising that.

Just to make sure I'm not going in the wrong direction, the idea would
be to build on

https://lore.kernel.org/all/20260303000207.1836586-9-dan.j.williams@xxxxxxxxx/

and add something like this?

```
static const struct pci_tsm_ops pci_cma_tsm_ops = {
.link_ops = {
.probe = pci_cma_tsm_probe,
.remove = pci_cma_tsm_remove,
.connect = pci_cma_tsm_connect,
.disconnect = pci_cma_tsm_disconnect,
},
.refresh_evidence = pci_cma_tsm_refresh,
};
```

The docs for `struct pci_tsm_ops` seem pretty TSM specific, so I just
wanted to double check before going ahead.

That means all of the netlink stuff in this series can be dropped and
we just use the TSM netlink (which might need some adjustments then,
I'll have to double check)

Alistair

>
> Thanks,
>
> Lukas