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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 26 Apr 2019 09:26:59 +0200
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     Dave Hansen <dave.hansen@...el.com>
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org, jannh@...gle.com,
        riel@...riel.com, mingo@...hat.com, bp@...e.de, Jason@...c4.com,
        luto@...nel.org, tglx@...utronix.de, rkrcmar@...hat.com,
        mingo@...nel.org, hpa@...or.com, kvm@...r.kernel.org,
        pbonzini@...hat.com, kurt.kanzenbach@...utronix.de
Subject: Re: [RFC PATCH] x86/fpu: Don't unconditionally add
 XFEATURE_MASK_FPSSE on sigentry

On 2019-04-25 14:13:05 [-0700], Dave Hansen wrote:
> On 4/25/19 10:35 AM, Sebastian Andrzej Siewior wrote:
> > This commit reverts commit 04944b793e18e ("x86: xsave: set FP, SSE bits
> > in the xsave header in the user sigcontext"). The commit claims that it
> > is required for legacy applications but fails to explain why this is
> > needed and it is not obvious to me why the application would require the
> > FP/SSE state in the signal handler.
> 
> Any software that understands XSAVE is OK.  I think the legacy software
> would be that which groks 'fxregs_state, and FXSAVE/FXRSTOR but does not
> comprehend XSAVE/XRSTOR.  *That* software might change fxregs_state in
> the signal frame, but the lack of XFEATURE_MASK_FPSSE in xfeatures would
> prevent XRSTOR from restoring it.

but it would edit its FP state before it has been used.

> That's just a guess, though.
> 
> If we care, I think we should just use XSAVE instead of XSAVEOPT and
> trying to reconstruct the init state in software.

We can't use XSAVE directly in the slowpath. We need to reconstruct the
init state. We have the mxcsr quirk. We would need just to extend it and
set the FP area to init state if the FP state is missing like we do in
fpstate_sanitize_xstate().

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ