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:   Thu, 17 Jun 2021 00:02:42 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     LKML <linux-kernel@...r.kernel.org>
Cc:     Andy Lutomirski <luto@...nel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Tony Luck <tony.luck@...el.com>,
        Yu-cheng Yu <yu-cheng.yu@...el.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Borislav Petkov <bp@...e.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Kan Liang <kan.liang@...ux.intel.com>
Subject: Re: [patch V2 02/52] x86/fpu: Fix copy_xstate_to_kernel() gap handling

On Mon, Jun 14 2021 at 17:44, Thomas Gleixner wrote:
> The gap handling in copy_xstate_to_kernel() is wrong in two aspects when
> XSAVES is in use.
>
>   1) Copying of xstate.i387.xmm_space is only copied when the SSE feature
>      bit is set. This is not correct because YMM (AVX) shares the XMM space
>      and that state must also be copied if only the YMM feature bit set
>      like already done for MXCSR.

Thinking more about it. That'd be broken in hardware. When YMM is not in
init state then SSE cannot be in init state.

Of course you can use xsave, then clear the SSE bit and XRSTOR which
blows away the SSE state. Or clear the bit in the sigframe. So copying
it over is silly as XRSTOR will ignore it anyway. If so, user space can
keep the pieces. Let me take that out.

This stuff drives me nuts.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ