linux/arch
Kyle Huey 3c1940c549 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
behave identically.

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>
History 2023-01-14 10:23:27 +01:00
..
alpha alpha: fix syscall entry in !AUDUT_SYSCALL case 2022-12-31 13:14:01 +01:00
arc arc: iounmap() arg is volatile 2022-11-03 23:59:15 +09:00
arm ARM: renumber bits related to _TIF_WORK_MASK 2023-01-12 11:59:05 +01:00
arm64 arm64: dts: qcom: sdm850-lenovo-yoga-c630: correct I2C12 pins drive strength 2023-01-12 11:58:51 +01:00
csky csky/kprobe: reclaim insn_slot on kprobe unregistration 2022-08-25 11:40:38 +02:00
h8300 Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
hexagon uaccess: fix integer overflow on access_ok() 2022-03-28 09:58:45 +02:00
ia64 ia64: export memory_add_physaddr_to_nid to fix cxl build error 2022-10-26 12:34:59 +02:00
m68k m68k: coldfire/device.c: protect FLEXCAN blocks 2022-08-25 11:40:05 +02:00
microblaze uaccess: fix nios2 and microblaze get_user_8() 2022-04-08 14:23:18 +02:00
mips MIPS: OCTEON: warn only once if deprecated link status is being used 2022-12-31 13:14:05 +01:00
nds32 nds32: fix access_ok() checks in get/put_user 2022-03-28 09:58:46 +02:00
nios2 nios2: add FORCE for vmlinuz.gz 2022-12-02 17:41:08 +01:00
openrisc openrisc: io: Define iounmap argument as volatile 2022-08-25 11:40:38 +02:00
parisc parisc: Align parisc MADV_XXX constants with all other architectures 2023-01-14 10:23:27 +01:00
powerpc powerpc/rtas: avoid scheduling in rtas_os_term() 2023-01-12 11:58:46 +01:00
riscv riscv, kprobes: Stricter c.jr/c.jalr decoding 2023-01-12 11:59:18 +01:00
s390 KVM: s390: vsie: Fix the initialization of the epoch extension (epdx) field 2022-12-14 11:37:20 +01:00
sh sh: machvec: Use char[] for section boundaries 2022-10-26 12:34:36 +02:00
sparc signal: Deliver SIGTRAP on perf event asynchronously if blocked 2022-06-09 10:22:48 +02:00
um UM: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK 2022-10-26 12:34:23 +02:00
x86 x86/fpu: Emulate XRSTOR's behavior if the xfeatures PKRU bit is not set 2023-01-14 10:23:27 +01:00
xtensa xtensa: iss: fix handling error cases in iss_net_configure() 2022-08-17 14:23:52 +02:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Kconfig arch: make TRACE_IRQFLAGS_NMI_SUPPORT generic 2022-08-17 14:23:00 +02:00