|
|
75d449a |
From c01ff700ea4192ae04b306fef725d62189550236 Mon Sep 17 00:00:00 2001
|
|
|
6a91557 |
From: Josh Boyer <jwboyer@fedoraproject.org>
|
|
|
6a91557 |
Date: Tue, 27 Aug 2013 13:33:03 -0400
|
|
|
48f65f6 |
Subject: [PATCH 13/20] efi: Add EFI_SECURE_BOOT bit
|
|
|
6a91557 |
|
|
|
6a91557 |
UEFI machines can be booted in Secure Boot mode. Add a EFI_SECURE_BOOT bit
|
|
|
6a91557 |
for use with efi_enabled.
|
|
|
6a91557 |
|
|
|
6a91557 |
Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
|
|
|
6a91557 |
---
|
|
|
6a91557 |
arch/x86/kernel/setup.c | 2 ++
|
|
|
6a91557 |
include/linux/efi.h | 1 +
|
|
|
6a91557 |
2 files changed, 3 insertions(+)
|
|
|
6a91557 |
|
|
|
6a91557 |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
|
|
|
75d449a |
index f3b804f..a401ff8 100644
|
|
|
6a91557 |
--- a/arch/x86/kernel/setup.c
|
|
|
6a91557 |
+++ b/arch/x86/kernel/setup.c
|
|
|
75d449a |
@@ -1145,7 +1145,9 @@ void __init setup_arch(char **cmdline_p)
|
|
|
6a91557 |
|
|
|
6a91557 |
#ifdef CONFIG_EFI_SECURE_BOOT_SIG_ENFORCE
|
|
|
6a91557 |
if (boot_params.secure_boot) {
|
|
|
6a91557 |
+ set_bit(EFI_SECURE_BOOT, &efi.flags);
|
|
|
6a91557 |
enforce_signed_modules();
|
|
|
6a91557 |
+ pr_info("Secure boot enabled\n");
|
|
|
6a91557 |
}
|
|
|
6a91557 |
#endif
|
|
|
6a91557 |
|
|
|
6a91557 |
diff --git a/include/linux/efi.h b/include/linux/efi.h
|
|
|
75d449a |
index 569b5a8..4dc970e 100644
|
|
|
6a91557 |
--- a/include/linux/efi.h
|
|
|
6a91557 |
+++ b/include/linux/efi.h
|
|
|
75d449a |
@@ -980,6 +980,7 @@ extern int __init efi_setup_pcdp_console(char *);
|
|
|
6a91557 |
#define EFI_ARCH_1 7 /* First arch-specific bit */
|
|
|
b18e6e7 |
#define EFI_DBG 8 /* Print additional debug info at runtime */
|
|
|
75d449a |
#define EFI_NX_PE_DATA 9 /* Can runtime data regions be mapped non-executable? */
|
|
|
75d449a |
+#define EFI_SECURE_BOOT 10 /* Are we in Secure Boot mode? */
|
|
|
6a91557 |
|
|
|
6a91557 |
#ifdef CONFIG_EFI
|
|
|
6a91557 |
/*
|
|
|
48f65f6 |
--
|
|
|
75d449a |
2.5.0
|
|
|
48f65f6 |
|