2018-01-09 22:09:19 +00:00
|
|
|
From 520e902d864930e2d4f329983d9ae9781a24231f Mon Sep 17 00:00:00 2001
|
2017-10-03 18:57:50 +00:00
|
|
|
From: Peter Jones <pjones@redhat.com>
|
|
|
|
Date: Mon, 2 Oct 2017 18:18:30 -0400
|
|
|
|
Subject: [PATCH 3/3] Make get_cert_list() use efi_status_to_str() to print
|
|
|
|
error messages.
|
|
|
|
|
|
|
|
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
|
---
|
2019-01-07 21:09:43 +00:00
|
|
|
security/integrity/platform_certs/load_uefi.c | 6 ++++--
|
2017-10-03 18:57:50 +00:00
|
|
|
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
|
2018-01-09 22:09:19 +00:00
|
|
|
index 9ef34c44fd1..13a2826715d 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
|
2017-10-03 18:57:50 +00:00
|
|
|
@@ -51,7 +51,8 @@ static __init int get_cert_list(efi_char16_t *name, efi_guid_t *guid,
|
|
|
|
}
|
|
|
|
|
|
|
|
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 efi_status_to_err(status);
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -64,7 +65,8 @@ static __init int 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 efi_status_to_err(status);
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2018-01-09 22:09:19 +00:00
|
|
|
2.15.0
|
2017-10-03 18:57:50 +00:00
|
|
|
|