mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-21 18:14:48 +08:00
x86/fpu/xstate: Fix PKRU covert channel
When XCR0[9] is set, PKRU can be read and written from userspace with XSAVE and XRSTOR, even when CR4.PKE is clear. Clear XCR0[9] when protection keys are disabled. Reported-by: Tavis Ormandy <taviso@google.com> Signed-off-by: Jim Mattson <jmattson@google.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/r/20230831043228.1194256-1-jmattson@google.com
This commit is contained in:
parent
d87e89c273
commit
18032b47ad
@ -71,7 +71,7 @@ static unsigned short xsave_cpuid_features[] __initdata = {
|
||||
[XFEATURE_ZMM_Hi256] = X86_FEATURE_AVX512F,
|
||||
[XFEATURE_Hi16_ZMM] = X86_FEATURE_AVX512F,
|
||||
[XFEATURE_PT_UNIMPLEMENTED_SO_FAR] = X86_FEATURE_INTEL_PT,
|
||||
[XFEATURE_PKRU] = X86_FEATURE_PKU,
|
||||
[XFEATURE_PKRU] = X86_FEATURE_OSPKE,
|
||||
[XFEATURE_PASID] = X86_FEATURE_ENQCMD,
|
||||
[XFEATURE_XTILE_CFG] = X86_FEATURE_AMX_TILE,
|
||||
[XFEATURE_XTILE_DATA] = X86_FEATURE_AMX_TILE,
|
||||
|
Loading…
Reference in New Issue
Block a user