]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
UBUNTU: SAUCE: UEFI: efi: Add EFI_SECURE_BOOT bit
authorJosh Boyer <jwboyer@fedoraproject.org>
Tue, 27 Aug 2013 17:33:03 +0000 (13:33 -0400)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 20 Feb 2017 03:57:58 +0000 (20:57 -0700)
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>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
arch/x86/kernel/setup.c
include/linux/efi.h

index 7c4295cdea28028dfe32cfb43a2441f869f84031..c5c88bc5dc2a302cdad56ebc1c709c9546e40ec9 100644 (file)
@@ -1186,7 +1186,9 @@ void __init setup_arch(char **cmdline_p)
 
 #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
 
index 5b1af30ece55828e655b2bf02a149fd71354f3eb..1b12c29fdb55e0815725d489b6e32b0673bf83f9 100644 (file)
@@ -1065,6 +1065,7 @@ extern int __init efi_setup_pcdp_console(char *);
 #define EFI_ARCH_1             7       /* First arch-specific bit */
 #define EFI_DBG                        8       /* Print additional debug info at runtime */
 #define EFI_NX_PE_DATA         9       /* Can runtime data regions be mapped non-executable? */
+#define EFI_SECURE_BOOT                10      /* Are we in Secure Boot mode? */
 
 #ifdef CONFIG_EFI
 /*