2014-08-20 17:22:24 +00:00
|
|
|
From: Josh Boyer <jwboyer@fedoraproject.org>
|
|
|
|
Date: Tue, 27 Aug 2013 13:33:03 -0400
|
|
|
|
Subject: [PATCH] efi: Add EFI_SECURE_BOOT bit
|
|
|
|
|
|
|
|
UEFI machines can be booted in Secure Boot mode. Add a EFI_SECURE_BOOT bit
|
|
|
|
for use with efi_enabled.
|
|
|
|
|
|
|
|
Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
|
|
|
|
---
|
|
|
|
arch/x86/kernel/setup.c | 2 ++
|
|
|
|
include/linux/efi.h | 1 +
|
|
|
|
2 files changed, 3 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
|
2014-11-03 15:15:39 +00:00
|
|
|
index f4eb99432db1..bc31a43b31a0 100644
|
2014-08-20 17:22:24 +00:00
|
|
|
--- a/arch/x86/kernel/setup.c
|
|
|
|
+++ b/arch/x86/kernel/setup.c
|
2014-11-03 15:15:39 +00:00
|
|
|
@@ -1152,7 +1152,9 @@ void __init setup_arch(char **cmdline_p)
|
2014-08-20 17:22:24 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_EFI_SECURE_BOOT_SIG_ENFORCE
|
|
|
|
if (boot_params.secure_boot) {
|
|
|
|
+ set_bit(EFI_SECURE_BOOT, &efi.flags);
|
|
|
|
enforce_signed_modules();
|
|
|
|
+ pr_info("Secure boot enabled\n");
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
diff --git a/include/linux/efi.h b/include/linux/efi.h
|
2014-10-24 14:02:17 +00:00
|
|
|
index 0949f9c7e872..130ba866a24a 100644
|
2014-08-20 17:22:24 +00:00
|
|
|
--- a/include/linux/efi.h
|
|
|
|
+++ b/include/linux/efi.h
|
2014-10-24 14:02:17 +00:00
|
|
|
@@ -936,6 +936,7 @@ extern int __init efi_setup_pcdp_console(char *);
|
2014-08-20 17:22:24 +00:00
|
|
|
#define EFI_64BIT 5 /* Is the firmware 64-bit? */
|
|
|
|
#define EFI_PARAVIRT 6 /* Access is via a paravirt interface */
|
|
|
|
#define EFI_ARCH_1 7 /* First arch-specific bit */
|
|
|
|
+#define EFI_SECURE_BOOT 8 /* Are we in Secure Boot mode? */
|
|
|
|
|
|
|
|
#ifdef CONFIG_EFI
|
|
|
|
/*
|
|
|
|
--
|
2014-12-09 14:25:39 +00:00
|
|
|
2.1.0
|
2014-08-20 17:22:24 +00:00
|
|
|
|