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: <20140825173930.GA10376@redhat.com>
Date:	Mon, 25 Aug 2014 19:39:30 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Al Viro <viro@...iv.linux.org.uk>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Fenghua Yu <fenghua.yu@...el.com>,
	Suresh Siddha <sbsiddha@...il.com>,
	Bean Anderson <bean@...lsystems.com>,
	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	the arch/x86 maintainers <x86@...nel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/5] x86, fpu: don't drop_fpu() in
	__restore_xstate_sig() if use_eager_fpu()

On 08/25, Linus Torvalds wrote:
>
> On Mon, Aug 25, 2014 at 10:09 AM, Oleg Nesterov <oleg@...hat.com> wrote:
> >
> > I'd like to change it only because this code is the main source of the
> > nasty special case, used_math() and/or __thread_has_fpu(current) can be
> > false even if use_eager_fpu().
>
> Well, if you think it is correct (apart from missing preemption), then
> I disagree *violently* with your "clean it up by restoring things
> twice" model.

OK.

> The signal handling overhead of floating point restore is not small,
> and it's not theoretical.

Again, this only if 32bit && use_eager_fpu(), and use_eager_fpu() adds
this overhead to every context switch.

But you convinced me anyway. If this hack doesn't look "obviously safe
and correct", lets forget it.

I'll try to play with copy_from_user_in_atomic(), if nothing else just
to complete the discussion and see how the code can look in this case.

Thanks!

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