summaryrefslogtreecommitdiff
path: root/SOURCES/0001-Make-get_cert_list-use-efi_status_to_str-to-print-er.patch
diff options
context:
space:
mode:
authorSentry <sentry@Sentry-Desktop-Fedora.local>2020-07-14 15:58:43 +0200
committerJan200101 <sentrycraft123@gmail.com>2020-12-05 19:40:07 +0100
commit391fe055c943e33e9c191dbeeb21995c0d54ccd9 (patch)
tree04bbfbe91a73cc0d47c2d70235c8ca365eaa9c3d /SOURCES/0001-Make-get_cert_list-use-efi_status_to_str-to-print-er.patch
downloadkernel-fsync-391fe055c943e33e9c191dbeeb21995c0d54ccd9.tar.gz
kernel-fsync-391fe055c943e33e9c191dbeeb21995c0d54ccd9.zip
kernel 5.7.8
Diffstat (limited to 'SOURCES/0001-Make-get_cert_list-use-efi_status_to_str-to-print-er.patch')
-rw-r--r--SOURCES/0001-Make-get_cert_list-use-efi_status_to_str-to-print-er.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/SOURCES/0001-Make-get_cert_list-use-efi_status_to_str-to-print-er.patch b/SOURCES/0001-Make-get_cert_list-use-efi_status_to_str-to-print-er.patch
new file mode 100644
index 0000000..671b740
--- /dev/null
+++ b/SOURCES/0001-Make-get_cert_list-use-efi_status_to_str-to-print-er.patch
@@ -0,0 +1,40 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones@redhat.com>
+Date: Mon, 2 Oct 2017 18:18:30 -0400
+Subject: [PATCH] Make get_cert_list() use efi_status_to_str() to print error
+ messages.
+
+Upstream Status: RHEL only
+Signed-off-by: Peter Jones <pjones@redhat.com>
+Signed-off-by: Jeremy Cline <jcline@redhat.com>
+---
+ security/integrity/platform_certs/load_uefi.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/security/integrity/platform_certs/load_uefi.c b/security/integrity/platform_certs/load_uefi.c
+index 253fb9a7fc98..8c95b68d86d4 100644
+--- a/security/integrity/platform_certs/load_uefi.c
++++ b/security/integrity/platform_certs/load_uefi.c
+@@ -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;
+ }
+
+--
+2.26.2
+