Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1574562

[PATCH 6/7] efi: Print the secure boot status in x86 setup_arch()

From Ard Biesheuvel <ard.biesheuvel@linaro.org>
Newsgroups linux.kernel
Subject [PATCH 6/7] efi: Print the secure boot status in x86 setup_arch()
Date 2017-02-06 12:30 +0100
Message-ID <t7PEC-4iF-3@gated-at.bofh.it> (permalink)
References <t7PEC-4iF-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: David Howells <dhowells@redhat.com>

Print the secure boot status in the x86 setup_arch() but otherwise do
nothing more for now. More functionality will be added later, but this at
least allows for testing.

Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
[ardb: use efi_enabled() instead of IS_ENABLED(CONFIG_EFI)]
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 arch/x86/kernel/setup.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 4cfba947d774..69780edf0dde 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1176,6 +1176,20 @@ void __init setup_arch(char **cmdline_p)
 	/* Allocate bigger log buffer */
 	setup_log_buf(1);
 
+	if (efi_enabled(EFI_BOOT)) {
+		switch (boot_params.secure_boot) {
+		case efi_secureboot_mode_disabled:
+			pr_info("Secure boot disabled\n");
+			break;
+		case efi_secureboot_mode_enabled:
+			pr_info("Secure boot enabled\n");
+			break;
+		default:
+			pr_info("Secure boot could not be determined\n");
+			break;
+		}
+	}
+
 	reserve_initrd();
 
 	acpi_table_upgrade();
-- 
2.7.4

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 6/7] efi: Print the secure boot status in x86 setup_arch() Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-02-06 12:30 +0100
  [tip:efi/core] efi: Print the secure boot status in x86  setup_arch() tip-bot for David Howells <tipbot@zytor.com> - 2017-02-07 10:50 +0100

csiph-web