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. So based on that usually a literal and unquestionable truth, when it comes to securing platforms, the next question is how to make a single atomic root of trust for Trenchboot. There is really only one answer I think of for this it to make slmodule part of the tpm_tis_core and also init order will be sorted out. I'll describe the steps forward. Step 1: declare and refactor that module into drivers/char/tpm/tpm_tis_slmodule.c and add this to the Makefile: ifdef CONFIG_SECURE_LAUNCH obj-$(CONFIG_TCG_TIS_CORE) += tpm_tis_slmodule.o endif Step 2: add 'int kernel_locality;' to struct tpm_tis_data. Step 3: implement tpm_tis_set_locality() internal function. Step 4: drop sysfs-patch completely (solution is not generic). BR, Jarkko