acrn-kernel/arch
Kyle Huey d2602da3da x86/fpu: Emulate XRSTOR's behavior if the xfeatures PKRU bit is not set
commit d7e5aceace upstream.

The hardware XRSTOR instruction resets the PKRU register to its hardware
init value (namely 0) if the PKRU bit is not set in the xfeatures mask.
Emulating that here restores the pre-5.14 behavior for PTRACE_SET_REGSET
with NT_X86_XSTATE, and makes sigreturn (which still uses XRSTOR) and
ptrace behave identically. KVM has never used XRSTOR and never had this
behavior, so KVM opts-out of this emulation by passing a NULL pkru pointer
to copy_uabi_to_xstate().

Fixes: e84ba47e31 ("x86/fpu: Hook up PKRU into ptrace()")
Signed-off-by: Kyle Huey <me@kylehuey.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/20221115230932.7126-6-khuey%40kylehuey.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-14 10:33:42 +01:00
..
alpha alpha: fix syscall entry in !AUDUT_SYSCALL case 2022-12-31 13:31:55 +01:00
arc
arm ARM: renumber bits related to _TIF_WORK_MASK 2023-01-12 12:01:55 +01:00
arm64 arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon 2023-01-07 11:11:49 +01:00
csky
hexagon
ia64
loongarch LoongArch: mm: Fix huge page entry update for virtual machine 2022-12-08 14:59:15 +08:00
m68k
microblaze
mips of/fdt: run soc memory setup when early_init_dt_scan_memory fails 2023-01-12 12:02:51 +01:00
nios2
openrisc
parisc parisc: Align parisc MADV_XXX constants with all other architectures 2023-01-14 10:33:40 +01:00
powerpc powerpc/ftrace: fix syscall tracing on PPC64_ELF_ABI_V1 2023-01-07 11:11:48 +01:00
riscv riscv, kprobes: Stricter c.jr/c.jalr decoding 2023-01-12 12:02:51 +01:00
s390 * Document the interaction between KVM_CAP_HALT_POLL and halt_poll_ns 2022-12-06 10:49:19 -08:00
sh
sparc
um um: virt-pci: Avoid GCC non-NULL warning 2023-01-07 11:11:52 +01:00
x86 x86/fpu: Emulate XRSTOR's behavior if the xfeatures PKRU bit is not set 2023-01-14 10:33:42 +01:00
xtensa xtensa: add __umulsidi3 helper 2023-01-07 11:11:46 +01:00
.gitignore
Kconfig ftrace: Allow WITH_ARGS flavour of graph tracer with shadow call stack 2022-12-31 13:32:45 +01:00