Re: [PATCH v2] x86/fpu: Fault-in user stack if copy_fpstate_to_sigframe() fails

2019-05-02 Thread Borislav Petkov
On Thu, May 02, 2019 at 07:11:39PM +0200, Sebastian Andrzej Siewior wrote: > In the compacted form, XSAVES may save only the XMM+SSE state but skip > FP (x87 state). > > This is denoted by header->xfeatures = 6. The fastpath > (copy_fpregs_to_sigframe()) does that but _also_ initialises the FP > s

[PATCH v2] x86/fpu: Fault-in user stack if copy_fpstate_to_sigframe() fails

2019-05-02 Thread Sebastian Andrzej Siewior
In the compacted form, XSAVES may save only the XMM+SSE state but skip FP (x87 state). This is denoted by header->xfeatures = 6. The fastpath (copy_fpregs_to_sigframe()) does that but _also_ initialises the FP state (cwd to 0x37f, mxcsr as we do, remaining fields to 0). The slowpath (copy_xstate_