]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
UBUNTU: SAUCE: (lockdown) Make get_cert_list() use efi_status_to_str() to print error...
authorPeter Jones <pjones@redhat.com>
Mon, 2 Oct 2017 22:18:30 +0000 (18:18 -0400)
committerPaolo Pisati <paolo.pisati@canonical.com>
Tue, 2 Nov 2021 07:24:55 +0000 (08:24 +0100)
Upstream Status: RHEL only
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Jeremy Cline <jcline@redhat.com>
(cherry picked from commit 7ba28f03674fa9346610c3fea7fc93bc58f06d2a
from https://gitlab.com/cki-project/kernel-ark)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
security/integrity/platform_certs/load_uefi.c

index f290f78c3f3012976a15d507cd26f195230a7fd0..d3e7ae04f5be874d500731b019294f117523ed4d 100644 (file)
@@ -46,7 +46,8 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
                return NULL;
 
        if (*status != EFI_BUFFER_TOO_SMALL) {
-               pr_err("Couldn't get size: 0x%lx\n", *status);
+               pr_err("Couldn't get size: %s (0x%lx)\n",
+                      efi_status_to_str(*status), *status);
                return NULL;
        }
 
@@ -57,7 +58,8 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
        *status = efi.get_variable(name, guid, NULL, &lsize, db);
        if (*status != EFI_SUCCESS) {
                kfree(db);
-               pr_err("Error reading db var: 0x%lx\n", *status);
+               pr_err("Error reading db var: %s (0x%lx)\n",
+                      efi_status_to_str(*status), *status);
                return NULL;
        }