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]
Message-ID: <20190215092841.GA10433@zn.tnic>
Date:   Fri, 15 Feb 2019 10:28:41 +0100
From:   Borislav Petkov <bp@...en8.de>
To:     Chao Fan <fanc.fnst@...fujitsu.com>
Cc:     linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
        hpa@...or.com, x86@...nel.org
Subject: Re: [PATCH] x86/boot: Move detecting acpi=off in cmdline to
 get_rsdp_addr()

On Fri, Feb 15, 2019 at 05:10:47PM +0800, Chao Fan wrote:
> If "acpi=off" specified in cmdline, the whole functions of acpi.c
> should not work, there is no need to ealy parse RSDP, so detect
> "acpi=off" in the very first place.
> 
> Also replace magic number with macro.
> 
> Signed-off-by: Chao Fan <fanc.fnst@...fujitsu.com>
> ---
>  arch/x86/boot/compressed/acpi.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/x86/boot/compressed/acpi.c b/arch/x86/boot/compressed/acpi.c
> index 0ef4ad55b29b..5510a2105b7b 100644
> --- a/arch/x86/boot/compressed/acpi.c
> +++ b/arch/x86/boot/compressed/acpi.c
> @@ -213,8 +213,13 @@ static acpi_physical_address bios_get_rsdp_addr(void)
>  /* Return RSDP address on success, otherwise 0. */
>  acpi_physical_address get_rsdp_addr(void)
>  {
> +	char arg[MAX_ACPI_ARG_LENGTH];
>  	acpi_physical_address pa;
>  
> +	if (cmdline_find_option("acpi", arg, sizeof(arg)) == 3 &&
> +	    !strncmp(arg, "off", 3))
> +		return 0;

This place looks wrong because we have a get_acpi_rsdp() call before
that which overrides acpi=off practically.

Also, if you move it to get_rsdp_addr(), add a static variable recording
the previous result of the cmdline parsing because I don't want it
parsing cmdline each time it is called.

Thx.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ