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] [day] [month] [year] [list]
Message-ID: <AANLkTin64ZU+JiBpG7=hivVxGQ4k4-w9zQVPGmEouAfA@mail.gmail.com>
Date:	Thu, 7 Oct 2010 17:12:54 +0200
From:	Stephane Eranian <eranian@...gle.com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	mingo@...e.hu, Hans.Rosenfeld@....com, robert.richter@....com,
	tglx@...utronix.de, linux-kernel@...r.kernel.org,
	Andreas.Herrmann3@....com, peterz@...radead.org,
	fweisbec@...il.com, rostedt@...dmis.org, acme@...hat.com,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>, eranian@...il.com
Subject: Re: [RFC 0/3] Basic support for LWP

On Thu, Oct 7, 2010 at 3:59 PM, H. Peter Anvin <hpa@...or.com> wrote:
> On 10/07/2010 03:46 AM, Stephane Eranian wrote:
>>
>> As for the patch itself, I am not an expert at xsave/xrstor, but it seems to
>> me you could decouple LWP from FPU. I think  Brian had the same comment.
>> I suspect this can be done and it will certainly look cleaner.
>>
>
> Well, once you're using XSAVE you're not decoupled from the FPU.  Worse,
> if you're using XSAVE and not honoring CR0.TS you have a major design flaw.
>
I looked at the LWP documentation and it says:

"LWP does not support the “lazy” state save and restore that is
possible for floating point and SSE state. It does not interact with
the CR0.TS bit. Operating systems that support LWP must always do an
XSAVE to preserve the old thread’s LWP context and an XRSTOR to set up
the new LWP context. The OS can continue to do a lazy switch of the FP
and SSE state by ensuring that the corresponding bits in EDX:EAX are
clear when it executes the XSAVE and XRSTOR to handle the LWP
context."

They imply that you can still do lazy FP/SSE save/restore even though
CR0.TS does not monitor LWP access.

If LWP is used the kernel needs to call xsave/xrstor on ctxsw. It can
do this lazily by checking LWP_CBADDR.
--
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