diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-06-23 14:02:20 +0200 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-06-23 19:47:35 +0200 |
commit | 30a304a138738d71a09c730ca8044e9662de0dbf (patch) | |
tree | 23d96c22795456f369d22f31b278c7300d8e4327 /arch/x86/kernel/fpu | |
parent | x86/fpu: Hook up PKRU into ptrace() (diff) | |
download | linux-30a304a138738d71a09c730ca8044e9662de0dbf.tar.xz linux-30a304a138738d71a09c730ca8044e9662de0dbf.zip |
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
Diffstat (limited to 'arch/x86/kernel/fpu')
-rw-r--r-- | arch/x86/kernel/fpu/xstate.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c index 9fd124a001b0..21a10a66c4e4 100644 --- a/arch/x86/kernel/fpu/xstate.c +++ b/arch/x86/kernel/fpu/xstate.c @@ -60,6 +60,7 @@ static short xsave_cpuid_features[] __initdata = { * XSAVE buffer, both supervisor and user xstates. */ u64 xfeatures_mask_all __ro_after_init; +EXPORT_SYMBOL_GPL(xfeatures_mask_all); static unsigned int xstate_offsets[XFEATURE_MAX] __ro_after_init = { [ 0 ... XFEATURE_MAX - 1] = -1}; |