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:	Sat, 27 Feb 2016 13:02:11 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Borislav Petkov <bp@...en8.de>
Cc:	kernel test robot <ying.huang@...ux.intel.com>,
	Andy Lutomirski <luto@...nel.org>, lkp@...org,
	LKML <linux-kernel@...r.kernel.org>,
	yu-cheng yu <yu-cheng.yu@...el.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Sai Praneeth Prakhya <sai.praneeth.prakhya@...el.com>,
	Rik van Riel <riel@...hat.com>,
	Quentin Casasnovas <quentin.casasnovas@...cle.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Oleg Nesterov <oleg@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Fenghua Yu <fenghua.yu@...el.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	Andy Lutomirski <luto@...capital.net>
Subject: Re: [lkp] [x86/fpu] 58122bf1d8: WARNING: CPU: 0 PID: 1 at
 arch/x86/include/asm/fpu/internal.h:529 fpu__restore+0x28f/0x9ab()


* Borislav Petkov <bp@...en8.de> wrote:

> From: Borislav Petkov <bp@...e.de>
> Date: Mon, 15 Feb 2016 19:50:33 +0100
> Subject: [PATCH] x86/FPU: Fix double FPU regs activation
> 
> sys_sigreturn() calls fpu__restore_sig() with interrupts enabled. When
> restoring a 32-bit signal frame. And it can happen that we get preempted
> right after setting ->fpstate_active in a task's FPU.
> 
> After we get preempted, we switch between tasks merrily and eventually
> are about to switch to that task above whose ->fpstate_active we
> set. We enter __switch_to() and do switch_fpu_prepare(). Our task gets
> ->fpregs_active set, we find ourselves back on the call stack below and
> especially in __fpu__restore_sig() which sets ->fpregs_active again.
> 
> Leading to that whoops below.
> 
> So let's enlarge the preemption-off region so that we set
> ->fpstate_active with preemption disabled and thus not trigger
> fpu.preload:
> 
>   switch_fpu_prepare
> 
>   ...
> 
>         fpu.preload = static_cpu_has(X86_FEATURE_FPU) &&
>                       new_fpu->fpstate_active &&
> 		      ^^^^^^^^^^^^^^^^^^^^^^
> 
> prematurely.

So I'm wondering, why did this commit:

  58122bf1d856 x86/fpu: Default eagerfpu=on on all CPUs

trigger the warning, while it never triggered on CPUs that were already 
eagerfpu=on for years?

There must be something we are still missing I think.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ