From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753980AbdBGJtT (ORCPT ); Tue, 7 Feb 2017 04:49:19 -0500 Received: from terminus.zytor.com ([65.50.211.136]:33942 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753722AbdBGJtO (ORCPT ); Tue, 7 Feb 2017 04:49:14 -0500 Date: Tue, 7 Feb 2017 01:48:33 -0800 From: tip-bot for David Howells Message-ID: Cc: tglx@linutronix.de, torvalds@linux-foundation.org, hpa@zytor.com, linux-kernel@vger.kernel.org, ard.biesheuvel@linaro.org, matt@codeblueprint.co.uk, dhowells@redhat.com, mingo@kernel.org, peterz@infradead.org Reply-To: tglx@linutronix.de, torvalds@linux-foundation.org, hpa@zytor.com, linux-kernel@vger.kernel.org, ard.biesheuvel@linaro.org, matt@codeblueprint.co.uk, mingo@kernel.org, dhowells@redhat.com, peterz@infradead.org In-Reply-To: <1486380166-31868-7-git-send-email-ard.biesheuvel@linaro.org> References: <1486380166-31868-7-git-send-email-ard.biesheuvel@linaro.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:efi/core] efi: Print the secure boot status in x86 setup_arch() Git-Commit-ID: 9661b332041dab63ba2e5222b40a9f916c1368a9 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 9661b332041dab63ba2e5222b40a9f916c1368a9 Gitweb: http://git.kernel.org/tip/9661b332041dab63ba2e5222b40a9f916c1368a9 Author: David Howells AuthorDate: Mon, 6 Feb 2017 11:22:45 +0000 Committer: Ingo Molnar CommitDate: Tue, 7 Feb 2017 10:42:10 +0100 efi: Print the secure boot status in x86 setup_arch() Print the secure boot status in the x86 setup_arch() function, 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 [ Use efi_enabled() instead of IS_ENABLED(CONFIG_EFI). ] Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1486380166-31868-7-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar --- 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 4cfba94..69780ed 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();