lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 29 Aug 2019 14:18:19 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Rob Bradford <robert.bradford@...el.com>
cc:     x86@...nel.org, Ingo Molnar <mingo@...hat.com>,
        Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>, Rik van Riel <riel@...riel.com>,
        Juergen Gross <jgross@...e.com>,
        Jian-Hong Pan <jian-hong@...lessm.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>
Subject: Re: [PATCH] x86/reboot: Avoid EFI reboot when not running on EFI

On Thu, 29 Aug 2019, Rob Bradford wrote:

CC+ Ard

> Replace the check using efi_runtime_disabled() which only checks if EFI
> runtime was disabled on the kernel command line with a call to
> efi_enabled(EFI_RUNTIME_SERVICES) to check if EFI runtime services are
> available.
> 
> In the situation where the kernel was booted without an EFI environment
> then only efi_enabled(EFI_RUNTIME_SERVICES) correctly represents that no
> EFI is available. Setting "noefi" or "efi=noruntime" on the commandline
> continue to have the same effect as efi_enabled(EFI_RUNTIME_SERVICES)
> will return false.
>
>
> Signed-off-by: Rob Bradford <robert.bradford@...el.com>
> ---
>  arch/x86/kernel/reboot.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
> index 09d6bded3c1e..0b0a7fccdb00 100644
> --- a/arch/x86/kernel/reboot.c
> +++ b/arch/x86/kernel/reboot.c
> @@ -500,7 +500,7 @@ static int __init reboot_init(void)
>  	 */
>  	rv = dmi_check_system(reboot_dmi_table);
>  
> -	if (!rv && efi_reboot_required() && !efi_runtime_disabled())
> +	if (!rv && efi_reboot_required() && efi_enabled(EFI_RUNTIME_SERVICES))

Why is efi_reboot_required() set at all in that situation?

Thanks,

	tglx


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ