x86/ima: Use EFI GetVariable only when available
Replace the EFI runtime services check with one that tells us whether EFI GetVariable() is implemented by the firmware. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
parent
9b42f76ad5
commit
9a440391b5
@ -19,7 +19,7 @@ static enum efi_secureboot_mode get_sb_mode(void)
|
||||
|
||||
size = sizeof(secboot);
|
||||
|
||||
if (!efi_enabled(EFI_RUNTIME_SERVICES)) {
|
||||
if (!efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE)) {
|
||||
pr_info("ima: secureboot mode unknown, no efi\n");
|
||||
return efi_secureboot_mode_unknown;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user