Commit 9a440391 authored by Ard Biesheuvel's avatar Ard Biesheuvel
Browse files

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: default avatarArd Biesheuvel <ardb@kernel.org>
parent 9b42f76a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}