lkml.org 
[lkml]   [2021]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch V3 56/66] x86/fpu: Dont store PKRU in xstate in fpu_reset_fpstate()
On Fri, Jun 18, 2021 at 04:19:19PM +0200, Thomas Gleixner wrote:
> PKRU for a task is stored in task->thread.pkru when the task is scheduled
> out. For 'current' the authoritative source of PKRU is the hardware.
>
> fpu_reset_fpstate() has two callers:
>
> 1) fpu__clear_user_states() for !FPU systems. For those PKRU is irrelevant
>
> 2) fpu_flush_thread() which is invoked from flush_thread(). flush_thread()
> resets the hardware to the kernel restrictive default value.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> ---
> arch/x86/kernel/fpu/core.c | 22 ++++------------------
> 1 file changed, 4 insertions(+), 18 deletions(-)

Reviewed-by: Borislav Petkov <bp@suse.de>

--
Regards/Gruss,
Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg

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