linux-stable/arch
Heiko Carstens 65def53e04 s390/vx: fix save/restore of fpu kernel context
[ Upstream commit e6b2dab418 ]

The KERNEL_FPR mask only contains a flag for the first eight vector
registers. However floating point registers overlay parts of the first
sixteen vector registers.

This could lead to vector register corruption if a kernel fpu context uses
any of the vector registers 8 to 15 and is interrupted or calls a
KERNEL_FPR context. If that context uses also vector registers 8 to 15,
their contents will be corrupted on return.

Luckily this is currently not a real bug, since the kernel has only one
KERNEL_FPR user with s390_adjust_jiffies() and it is only using floating
point registers 0 to 2.

Fix this by using the correct bits for KERNEL_FPR.

Fixes: 7f79695cc1 ("s390/fpu: improve kernel_fpu_[begin|end]")
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-08 11:25:02 +01:00
..
alpha alpha: remove __init annotation from exported page_is_ram() 2023-08-16 18:10:55 +02:00
arc arc: iounmap() arg is volatile 2022-11-03 23:50:54 +09:00
arm ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init 2024-01-08 11:25:02 +01:00
arm64 hw_breakpoint: fix single-stepping when using bpf_overflow_handler 2023-09-23 10:47:03 +02:00
blackfin
c6x
cris
frv
h8300 h8300: Fix build errors from do_exit() to make_task_dead() transition 2023-02-06 07:46:34 +01:00
hexagon hexagon: Fix function name in die() 2023-02-06 07:46:34 +01:00
ia64 treewide: Remove uninitialized_var() usage 2023-08-11 11:33:32 +02:00
m32r
m68k m68k: Fix invalid .section syntax 2023-09-23 10:46:53 +02:00
metag
microblaze exit: Add and use make_task_dead. 2023-02-06 07:46:33 +01:00
mips mmc: au1xmmc: force non-modular build and remove symbol_get usage 2023-09-23 10:46:52 +02:00
mn10300
nios2 nios2: dts: Fix tse_mac "max-frame-size" property 2023-06-21 15:38:58 +02:00
openrisc exit: Add and use make_task_dead. 2023-02-06 07:46:33 +01:00
parisc parisc/pgtable: Do not drop upper 5 address bits of physical address 2023-11-28 16:45:45 +00:00
powerpc powerpc/ftrace: Fix stack teardown in ftrace_no_trace 2023-12-20 15:32:39 +01:00
riscv/include/uapi/asm riscv: Bump COMMAND_LINE_SIZE value to 1024 2023-04-05 11:14:16 +02:00
s390 s390/vx: fix save/restore of fpu kernel context 2024-01-08 11:25:02 +01:00
score
sh sh: bios: Revive earlyprintk support 2023-11-20 10:27:34 +01:00
sparc sparc: fix up arch_cpu_finalize_init() build breakage. 2023-08-16 18:10:53 +02:00
tile
um um/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 19:48:24 +02:00
unicore32 linux/const.h: move UL() macro to include/linux/const.h 2022-11-10 15:47:24 +01:00
x86 KVM: x86: Ignore MSR_AMD64_TW_CFG access 2023-11-28 16:45:44 +00:00
xtensa xtensa: boot/lib: fix function prototypes 2023-10-10 21:43:39 +02:00
.gitignore
Kconfig init: Provide arch_cpu_finalize_init() 2023-08-08 19:48:23 +02:00