2015-09-09 15:10:06 +00:00
|
|
|
From b4467813ec088c13bd8c9f1eafb7c29d889d7c8f Mon Sep 17 00:00:00 2001
|
2014-08-20 17:22:24 +00:00
|
|
|
From: Josh Boyer <jwboyer@fedoraproject.org>
|
|
|
|
Date: Tue, 27 Aug 2013 13:33:03 -0400
|
2015-09-09 15:10:06 +00:00
|
|
|
Subject: [PATCH 13/20] efi: Add EFI_SECURE_BOOT bit
|
2014-08-20 17:22:24 +00:00
|
|
|
|
|
|
|
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
|
2015-09-09 15:10:06 +00:00
|
|
|
index 1ac118146e90..f93826b8522c 100644
|
2014-08-20 17:22:24 +00:00
|
|
|
--- a/arch/x86/kernel/setup.c
|
|
|
|
+++ b/arch/x86/kernel/setup.c
|
2015-09-09 15:10:06 +00:00
|
|
|
@@ -1137,7 +1137,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
|
2015-06-30 17:01:28 +00:00
|
|
|
index 85ef051ac6fb..de3e45088d4a 100644
|
2014-08-20 17:22:24 +00:00
|
|
|
--- a/include/linux/efi.h
|
|
|
|
+++ b/include/linux/efi.h
|
2015-06-30 17:01:28 +00:00
|
|
|
@@ -959,6 +959,7 @@ extern int __init efi_setup_pcdp_console(char *);
|
2014-08-20 17:22:24 +00:00
|
|
|
#define EFI_PARAVIRT 6 /* Access is via a paravirt interface */
|
|
|
|
#define EFI_ARCH_1 7 /* First arch-specific bit */
|
2015-04-14 13:54:01 +00:00
|
|
|
#define EFI_DBG 8 /* Print additional debug info at runtime */
|
|
|
|
+#define EFI_SECURE_BOOT 9 /* Are we in Secure Boot mode? */
|
2014-08-20 17:22:24 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_EFI
|
|
|
|
/*
|
2015-09-09 15:10:06 +00:00
|
|
|
--
|
|
|
|
2.4.3
|
|
|
|
|