[PATCH v2] integrity: Extract secure boot enquiry function out of IMA
GONG Ruiqi
gongruiqi1 at huawei.com
Thu Jul 3 15:19:21 AEST 2025
On 7/3/2025 11:35 AM, Mimi Zohar wrote:
> ...
>>
>> You're right. I didn't realize it's arch-specific in the first place,
>> and moving and renaming arch_ima_get_secureboot() turned out to be a
>> real mess ...
>>
>> So the V3 keeps the prototype of arch_ima_get_secureboot(), and only
>> moves out its body, which I think can also better represent the
>> intention of the patch.
>
> It's definitely much better. To summarize, arch_ima_get_secureboot() becomes a
> wrapper for integrity_get_efi_secureboot(). Before loading the MOK/MOKx keys,
> load_uefi_certs() calls integrity_get_efi_secureboot() directly.
Exactly.
>
> With load_uefi_certs() calling integrity_get_efi_secureboot() directly, please
> check to see whether an integrity_get_efi_secureboot() stub function needs to be
> defined.
For CONFIG_LOAD_UEFI_KEYS and CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT, the
former depends on CONFIG_EFI while the latter is implied by the same, so
integrity-$(CONFIG_EFI) += secureboot.o
should be enough. I've compile-tested the V3 on x86/arm64/powerpc/s390,
with various config combinations as much as I can think of. Let's see if
the kernel test robot could find out some corner cases.
-Ruiqi
>
> Mimi
>
>>
>> As of the name of the new file, as V3 has been sent earlier and still
>> uses secureboot.c, I can't change it there. I can do it in V4.
>>
>> -Ruiqi
>
More information about the Linuxppc-dev
mailing list