On Mon Nov 4, 2024 at 1:18 PM EET, Jarkko Sakkinen wrote: > On Mon Nov 4, 2024 at 12:57 PM EET, Daniel P. Smith wrote: > > On 11/2/24 14:00, Jarkko Sakkinen wrote: > > > On Sat Nov 2, 2024 at 5:22 PM EET, Jarkko Sakkinen wrote: > > >> It is not really my problem but I'm also wondering how the > > >> initialization order is managed. What if e.g. IMA happens to > > >> initialize before slmodule? > > > > > > The first obvious observation from Trenchboot implementation is that it > > > is 9/10 times worst idea ever to have splitted root of trust. Here it > > > is realized by an LKM for slmodule. > > > > First, there is no conflict between IMA and slmodule. With your change > > to make locality switching a one shot, the only issue would be if IMA > > were to run first and issue a locality switch to Locality 0, thus > > blocking slmodule from switching to Locality 2. As for PCR usage, IMA > > uses the SRTM PCRs, which are completely accessible under Locality 2. > > Just pointing out a possible problem (e.g. with TPM2_PolicyLocality). > > > Honestly, a better path forward would be to revisit the issue that is > > driving most of that logic existing, which is the lack of a TPM > > interface code in the setup kernel. As a reminder, this issue is due to > > the TPM maintainers position that the only TPM code in the kernel can be > > the mainline driver. Which, unless something has changed, is impossible > > to compile into the setup kernel due to its use of mainline kernel > > constructs not present in the setup kernel. > > I don't categorically reject adding some code to early setup. We have > some shared code EFI stub but you have to explain your changes > proeprly. Getting rejection in some early version to some approach, > and being still pissed about that years forward is not really way > to go IMHO. ... and ignoring fixes that took me almost one day to fully get together is neither. These address the awful commit messages, tpm_tis-only filtering and not allowing repetition in the calls. BR, Jarkko