]> git.baikalelectronics.ru Git - kernel.git/commit
x86/fpu/xstate: Handle supervisor states in XSTATE permissions
authorThomas Gleixner <tglx@linutronix.de>
Thu, 24 Mar 2022 13:47:14 +0000 (14:47 +0100)
committerBorislav Petkov <bp@suse.de>
Wed, 30 Mar 2022 09:35:22 +0000 (11:35 +0200)
commitf4afc509346eeed2b6e26af2a64e66b9b5c91bb3
tree82b9ea5f9e17f91eb8f9fe6334ae139daefbf69f
parent4498601d1a038eb5457c928eeaa4c6d0481d91c7
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: 2b1207b0e600 ("x86/cpufeatures: Re-enable ENQCMD")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220324134623.681768598@linutronix.de
arch/x86/kernel/fpu/xstate.c