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: <20150305151442.GA18996@redhat.com>
Date:	Thu, 5 Mar 2015 16:14:42 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Borislav Petkov <bp@...e.de>
Cc:	Dave Hansen <dave.hansen@...el.com>,
	Quentin Casasnovas <quentin.casasnovas@...cle.com>,
	Andy Lutomirski <luto@...capital.net>,
	Ingo Molnar <mingo@...nel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Pekka Riikonen <priikone@....fi>,
	Rik van Riel <riel@...hat.com>,
	Suresh Siddha <sbsiddha@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	"Yu, Fenghua" <fenghua.yu@...el.com>
Subject: Re: Oops with tip/x86/fpu

On 03/04, Borislav Petkov wrote:
>
> On Wed, Mar 04, 2015 at 08:06:51PM +0100, Oleg Nesterov wrote:
> > Thanks. I'll try to investigate tomorrow.
> >
> > Well, the kernel crashes because xrstor_state() is buggy, Quentin already
> > has a fix.
> >
> > But #GP should be explained...
>
> Could it be one of those conditions for which XRSTORS #GPs, like
>
> "If XRSTORS attempts to load MXCSR with an illegal value, a
> general-protection exception (#GP) occurs."
>
> for example? I'm looking at the SDM section for XRSTORS.
>
> I mean, math_state_restore() does init_fpu() and down that road we're
> allocating an FPU state ... but we did init_fpu() before too, in
> eager_fpu_init(). So what changed?

I _think_ that the difference is that eager_fpu_init()->xrstor_state()
was called before apply_alternatives(), so it used XRSTOR.

Note also that (before this commit) restore_fpu_checking() was almost
never called right after init_fpu(). If use_eager_fpu() == T.

After this commit the first xrstor_state() uses XRSTORS. And that is
how (I think) 'noxsaves' makes the difference.


So. I can be easily wrong, but so far I _think_ that this commit disclosed
another problem. And even if I am wrong and this commit is buggy, we need
to understand why ;)

I'll try to think about debugging patch, I can't reproduce this problem
on my machine...

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ