Messages in this thread | | | Subject | Re: [PATCH v2 8/8] x86/fpu/xstate: Restore supervisor xstates for __fpu__restore_sig() | From | Yu-cheng Yu <> | Date | Fri, 28 Feb 2020 14:13:29 -0800 |
| |
On Fri, 2020-02-28 at 22:47 +0100, Borislav Petkov wrote: > On Fri, Feb 28, 2020 at 01:22:39PM -0800, Yu-cheng Yu wrote: > > The code is for sigreturn only. Because of lazy-restore, > > copy_xregs_to_kernel() does not happen all the time. > > What does "not all the time" mean? You need to quantify this more > precisely.
If the XSAVES buffer already has current data (i.e. TIF_NEED_FPU_LOAD is set), then skip copy_xregs_to_kernel(). This happens when the task was context-switched out and has not returned to user-mode.
| |