Commit 26cef904 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Lin Wang
Browse files

x86/fpu/xstate: Handle supervisor states in XSTATE permissions

mainline inclusion
from mainline-v5.18-rc1
commit 781c64bf
category: bugfix
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I73H0T
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=781c64bfcb735960717d1cb45428047ff6a5030c



Intel-SIG: commit 781c64bf x86/fpu/xstate: Handle supervisor states in
XSTATE permissions.

--------------------------------

The size calculation in __xstate_request_perm() fails to take supervisor
states into account because the permission bitmap is only relevant for user
states.

Up to 5.17 this does not matter because there are no supervisor states
supported, but the (re-)enabling of ENQCMD makes them available.

Fixes: 7c1ef591 ("x86/cpufeatures: Re-enable ENQCMD")
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220324134623.681768598@linutronix.de


Signed-off-by: default avatarLin Wang <lin.x.wang@intel.com>
parent 8ee3061d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment