lkml.org 
[lkml]   [2021]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch V2 45/52] x86/fpu: Dont restore PKRU in fpregs_restore_userspace()
Date
On Tue, Jun 15 2021 at 17:52, Yu-cheng Yu wrote:
> On 6/14/2021 8:44 AM, Thomas Gleixner wrote:
>> + * If PKRU is enabled, then the PKRU value is already
>> + * correct because it was either set in switch_to() or in
>> + * flush_thread(). So it is excluded because it might be
>> + * not up to date in current->thread.fpu.xsave state.
>> + */
>> + __restore_fpregs_from_fpstate(&fpu->state,
>> + xfeatures_mask_restore_user());
>
> This needs to be xfeatures_mask_restore_user() |
> xfeatures_mask_supervisor().

Indeed. Good catch!

Thanks,

tglx

\
 
 \ /
  Last update: 2021-06-16 10:57    [W:0.087 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site