Re: [PATCH v2 8/8] x86/fpu/xstate: Restore supervisor xstates for __fpu__restore_sig()

Borislav Petkov
2020-03-06T20:50:51Z

On Wed, Mar 04, 2020 at 10:18:46AM -0800, Yu-cheng Yu wrote:
> There is another way to keep this patch...
>
> if (xfeatures_mask_supervisor()) {
> fpu->state.xsave.xfeatures &= xfeatures_mask_supervisor();

Is the subsequent XSAVE in copy_user_to_fpregs_zeroing() going to
restore the user bits in XSTATE_BV you just cleared?

Sorry, it looks like it would but the SDM text is abysmal.

--
Regards/Gruss,
Boris.