On 2019-04-08 19:05:56 [+0200], Thomas Gleixner wrote:
> > diff --git a/arch/x86/kernel/fpu/signal.c b/arch/x86/kernel/fpu/signal.c
> > index a5b086ec426a5..f20e1d1fffa29 100644
> > --- a/arch/x86/kernel/fpu/signal.c
> > +++ b/arch/x86/kernel/fpu/signal.c
> > @@ -242,10 +242,10 @@ sanitize_restored_xstate(union fpregs_state *state,
> > /*
> > * Restore the extended state if present. Otherwise, restore the FP/SSE
> > state.
> > */
> > -static inline int copy_user_to_fpregs_zeroing(void __user *buf, u64 xbv,
> > int fx_only)
> > +static int copy_user_to_fpregs_zeroing(void __user *buf, u64 xbv, int
> > fx_only)
> > {
> > if (use_xsave()) {
> > - if ((unsigned long)buf % 64 || fx_only) {
> > + if (fx_only) {
>
> This change is weird and not mentioned in the changelog....
if you scroll up there is this:
| * to loaded again on return to userland (overriding last_cpu avoids
the
| * optimisation).
| */
| set_thread_flag(TIF_NEED_FPU_LOAD);
| __fpu_invalidate_fpregs_state(fpu);
|
| if ((unsigned long)buf_fx % 64)
| fx_only = 1;
…
| ret = copy_user_to_fpregs_zeroing(buf_fx, xfeatures, fx_only);
| pagefault_enable();
so I just removed that part because it was already done earlier.
Is it still weird and should be mentioned in the changelog?
Sebastian