2018-04-03 17:41:24 +00:00
|
|
|
From 848a699f96e8529a30a47670051c5cb1f1a91d66 Mon Sep 17 00:00:00 2001
|
2017-06-16 19:31:32 +00:00
|
|
|
From: Peter Jones <pjones@redhat.com>
|
|
|
|
Date: Mon, 9 May 2016 14:15:17 -0400
|
2018-04-06 19:38:57 +00:00
|
|
|
Subject: [PATCH 170/227] Add some grub_dprintf() in the secure boot verify
|
2017-06-16 19:31:32 +00:00
|
|
|
code.
|
|
|
|
|
|
|
|
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
|
---
|
|
|
|
grub-core/loader/efi/linux.c | 16 +++++++++++++---
|
|
|
|
1 file changed, 13 insertions(+), 3 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c
|
2018-02-27 18:56:41 +00:00
|
|
|
index 2a7024134da..7fe7201a388 100644
|
2017-06-16 19:31:32 +00:00
|
|
|
--- a/grub-core/loader/efi/linux.c
|
|
|
|
+++ b/grub-core/loader/efi/linux.c
|
|
|
|
@@ -43,12 +43,22 @@ grub_linuxefi_secure_validate (void *data, grub_uint32_t size)
|
|
|
|
shim_lock = grub_efi_locate_protocol(&guid, NULL);
|
|
|
|
grub_dprintf ("secureboot", "shim_lock: %p\n", shim_lock);
|
|
|
|
if (!shim_lock)
|
|
|
|
- return 0;
|
|
|
|
+ {
|
|
|
|
+ grub_dprintf ("secureboot", "shim not available\n");
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- status = shim_lock->verify(data, size);
|
|
|
|
+ grub_dprintf ("secureboot", "Asking shim to verify kernel signature\n");
|
|
|
|
+ status = shim_lock->verify (data, size);
|
|
|
|
grub_dprintf ("secureboot", "shim_lock->verify(): %ld\n", status);
|
|
|
|
if (status == GRUB_EFI_SUCCESS)
|
|
|
|
- return 1;
|
|
|
|
+ {
|
|
|
|
+ grub_dprintf ("secureboot", "Kernel signature verification passed\n");
|
|
|
|
+ return 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ grub_dprintf ("secureboot", "Kernel signature verification failed (0x%lx)\n",
|
|
|
|
+ (unsigned long) status);
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
--
|
2018-02-27 18:56:41 +00:00
|
|
|
2.15.0
|
2017-06-16 19:31:32 +00:00
|
|
|
|