x86/fpu: Mask PKRU from kernel XRSTOR[S] operations
authorThomas Gleixner <tglx@linutronix.de>
Wed, 23 Jun 2021 12:02:20 +0000 (14:02 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 23 Jun 2021 17:47:35 +0000 (19:47 +0200)
commit30a304a138738d71a09c730ca8044e9662de0dbf
tree23d96c22795456f369d22f31b278c7300d8e4327
parente84ba47e313dbc097bf859bb6e4f9219883d5f78
x86/fpu: Mask PKRU from kernel XRSTOR[S] operations

As the PKRU state is managed separately restoring it from the xstate
buffer would be counterproductive as it might either restore a stale
value or reinit the PKRU state to 0.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210623121456.606745195@linutronix.de
arch/x86/include/asm/fpu/internal.h
arch/x86/include/asm/fpu/xstate.h
arch/x86/kernel/fpu/xstate.c
arch/x86/mm/extable.c