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: <20160929223852.GB13201@nazgul.tnic>
Date:   Fri, 30 Sep 2016 00:38:52 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Andy Lutomirski <luto@...nel.org>
Cc:     x86@...nel.org, david@...giorato.net,
        Brian Gerst <brgerst@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] x86/boot: Fix another __read_cr4() case on 486

On Thu, Sep 29, 2016 at 12:48:11PM -0700, Andy Lutomirski wrote:
> The condition for reading CR4 was wrong: there are some CPUs with
> CPUID but not CR4.  Rather than trying to make the condition exact,
> using __read_cr4_safe().

Please s/using/use/ while applying.

> Reported-by: david@...giorato.net
> Fixes: 18bc7bd523e0 ("x86/boot: Synchronize trampoline_cr4_features and mmu_cr4_features directly")
> Signed-off-by: Andy Lutomirski <luto@...nel.org>
> ---
>  arch/x86/kernel/setup.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index 0fa60f5f5a16..98c9cd6f3b5d 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -1137,9 +1137,7 @@ void __init setup_arch(char **cmdline_p)
>  	 * auditing all the early-boot CR4 manipulation would be needed to
>  	 * rule it out.
>  	 */
> -	if (boot_cpu_data.cpuid_level >= 0)
> -		/* A CPU has %cr4 if and only if it has CPUID. */
> -		mmu_cr4_features = __read_cr4();
> +	mmu_cr4_features = __read_cr4_safe();
>  
>  	memblock_set_current_limit(get_max_mapped());
>  
> -- 

Reviewed-by: Borislav Petkov <bp@...e.de>

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ