diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2020-02-16 19:46:25 +0100 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2020-02-23 21:59:42 +0100 |
commit | 6b75d54d5258ccd655387a00bbe1b00f92f4d965 (patch) | |
tree | 2994a7d5e639d5d8a01b28ada0f89a787619f58e /security/integrity | |
parent | 9a440391b560347bf5ee7cb96b63e7e91cedf66a (diff) |
integrity: Check properly whether EFI GetVariable() is available
Testing the value of the efi.get_variable function pointer is not
the right way to establish whether the platform supports EFI
variables at runtime. Instead, use the newly added granular check
that can test for the presence of each EFI runtime service
individually.
Acked-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'security/integrity')
-rw-r--r-- | security/integrity/platform_certs/load_uefi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/integrity/platform_certs/load_uefi.c b/security/integrity/platform_certs/load_uefi.c index 111898aad56e..e2fe1bd3abb9 100644 --- a/security/integrity/platform_certs/load_uefi.c +++ b/security/integrity/platform_certs/load_uefi.c @@ -76,7 +76,7 @@ static int __init load_uefi_certs(void) unsigned long dbsize = 0, dbxsize = 0, moksize = 0; int rc = 0; - if (!efi.get_variable) + if (!efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE)) return false; /* Get db, MokListRT, and dbx. They might not exist, so it isn't |