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: <20160123101415.GB16329@pd.tnic>
Date:	Sat, 23 Jan 2016 11:14:15 +0100
From:	Borislav Petkov <bp@...en8.de>
To:	Andy Lutomirski <luto@...nel.org>
Cc:	x86@...nel.org, linux-kernel@...r.kernel.org,
	Fenghua Yu <fenghua.yu@...el.com>,
	Oleg Nesterov <oleg@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Sai Praneeth Prakhya <sai.praneeth.prakhya@...el.com>,
	yu-cheng yu <yu-cheng.yu@...el.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	Rik van Riel <riel@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 4/5] x86/fpu: Speed up lazy FPU restores slightly

On Fri, Jan 22, 2016 at 04:56:05PM -0800, Andy Lutomirski wrote:
> If we have an FPU, there's no need to check CR0 for FPU emulation.
> 
> Signed-off-by: Andy Lutomirski <luto@...nel.org>
> ---
>  arch/x86/kernel/traps.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
> index 87f80febf477..183b300f6a8b 100644
> --- a/arch/x86/kernel/traps.c
> +++ b/arch/x86/kernel/traps.c
> @@ -752,7 +752,7 @@ do_device_not_available(struct pt_regs *regs, long error_code)
>  	RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
>  
>  #ifdef CONFIG_MATH_EMULATION
> -	if (read_cr0() & X86_CR0_EM) {
> +	if (!cpu_has_fpu && (read_cr0() & X86_CR0_EM)) {

Please use

	boot_cpu_has(X86_FEATURE_FPU)

We want to kill those cpu_has_xxx things.

-- 
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