Skip to content
Commit 3be54d55 authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Mimi Zohar
Browse files

efi: Only print errors about failing to get certs if EFI vars are found



If CONFIG_LOAD_UEFI_KEYS is enabled, the kernel attempts to load the certs
from the db, dbx and MokListRT EFI variables into the appropriate keyrings.

But it just assumes that the variables will be present and prints an error
if the certs can't be loaded, even when is possible that the variables may
not exist. For example the MokListRT variable will only be present if shim
is used.

So only print an error message about failing to get the certs list from an
EFI variable if this is found. Otherwise these printed errors just pollute
the kernel log ring buffer with confusing messages like the following:

[    5.427251] Couldn't get size: 0x800000000000000e
[    5.427261] MODSIGN: Couldn't get UEFI db list
[    5.428012] Couldn't get size: 0x800000000000000e
[    5.428023] Couldn't get UEFI MokListRT

Reported-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Tested-by: default avatarHans de Goede <hdegoede@redhat.com>
Acked-by: default avatarArd Biesheuvel <ardb@kernel.org>
Signed-off-by: default avatarMimi Zohar <zohar@linux.ibm.com>
parent ff5ac61e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment