diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2024-01-12 12:44:38 +0300 |
---|---|---|
committer | Borislav Petkov (AMD) <bp@alien8.de> | 2024-01-30 17:17:17 +0300 |
commit | 785ddc8b6bebd958a5b6fb7b6b4aa6584c2f0cb2 (patch) | |
tree | ca848e3d54ea8f36d3e23e19e4d963dee819e30c /arch/x86/platform/efi | |
parent | 2afa7994f794016d117b192e36b856df66d71172 (diff) | |
download | linux-785ddc8b6bebd958a5b6fb7b6b4aa6584c2f0cb2.tar.xz |
x86/efi: Implement arch_ima_efi_boot_mode() in source file
The x86 implementation of arch_ima_efi_boot_mode() uses the global
boot_param state. Move it into a source file to clean up the header.
Avoid potential rebuilds of unrelated source files if boot_params
changes.
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20240112095000.8952-4-tzimmermann@suse.de
Diffstat (limited to 'arch/x86/platform/efi')
-rw-r--r-- | arch/x86/platform/efi/efi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index e9f99c56f3ce..f090ec972d7b 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c @@ -950,3 +950,8 @@ umode_t efi_attr_is_visible(struct kobject *kobj, struct attribute *attr, int n) } return attr->mode; } + +enum efi_secureboot_mode __x86_ima_efi_boot_mode(void) +{ + return boot_params.secure_boot; +} |