kernel/0003-Make-get_cert_list-use-efi_status_to_str-to-print-er.patch

40 lines
1.4 KiB
Diff
Raw Normal View History

2020-02-24 15:40:08 +00:00
From 46daeedffe98b489014dcdcf14c89438362de7eb Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 2 Oct 2017 18:18:30 -0400
2020-02-24 15:40:08 +00:00
Subject: [PATCH] Make get_cert_list() use efi_status_to_str() to print error
messages.
Signed-off-by: Peter Jones <pjones@redhat.com>
2020-02-24 15:40:08 +00:00
Signed-off-by: Jeremy Cline <jcline@redhat.com>
---
2019-01-07 21:09:43 +00:00
security/integrity/platform_certs/load_uefi.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
2019-01-07 21:09:43 +00:00
diff --git a/security/integrity/platform_certs/load_uefi.c b/security/integrity/platform_certs/load_uefi.c
2020-02-24 15:40:08 +00:00
index f0c908241966..4e783f6c6cfb 100644
2019-01-07 21:09:43 +00:00
--- a/security/integrity/platform_certs/load_uefi.c
+++ b/security/integrity/platform_certs/load_uefi.c
2020-02-24 15:40:08 +00:00
@@ -46,7 +46,8 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
return NULL;
2020-02-24 15:40:08 +00:00
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",
2020-02-24 15:40:08 +00:00
+ efi_status_to_str(*status), *status);
return NULL;
}
2020-02-24 15:40:08 +00:00
@@ -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);
2020-02-24 15:40:08 +00:00
- pr_err("Error reading db var: 0x%lx\n", *status);
+ pr_err("Error reading db var: %s (0x%lx)\n",
2020-02-24 15:40:08 +00:00
+ efi_status_to_str(*status), *status);
return NULL;
}
--
2020-02-24 15:40:08 +00:00
2.24.1