linux-stable/arch/s390
Heiko Carstens 602490b469 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-01 12:42:26 +00:00
..
appldata sysctl: Add size to register_sysctl 2023-08-15 15:26:17 -07:00
boot s390/kasan: handle DCSS mapping in memory holes 2023-10-16 13:03:05 +02:00
configs cred: get rid of CONFIG_DEBUG_CREDENTIALS 2023-12-20 17:01:51 +01:00
crypto s390/paes: fix PKEY_TYPE_EP11_AES handling for secure keyblobs 2023-08-17 15:18:53 +02:00
hypfs s390 updates for 6.6 merge window 2023-08-28 17:22:39 -07:00
include s390/vx: fix save/restore of fpu kernel context 2024-01-01 12:42:26 +00:00
kernel s390/ipl: add missing IPL_TYPE_ECKD_DUMP case to ipl_init() 2023-12-03 07:33:04 +01:00
kvm KVM: s390: fix gisa destroy operation might lead to cpu stalls 2023-09-25 08:31:47 +02:00
lib s390: replace #include <asm/export.h> with #include <linux/export.h> 2023-08-09 15:20:50 +02:00
mm KVM: s390/mm: Properly reset no-dat 2023-12-13 18:45:34 +01:00
net s390/bpf: Fix unwinding past the trampoline 2023-10-11 00:08:46 +02:00
pci s390/pci: fix iommu bitmap allocation 2023-10-19 16:35:41 +02:00
purgatory s390 updates for 6.5 merge window part 2 2023-07-06 13:18:30 -07:00
tools KVM: s390: Add facility 197 to the allow list 2022-07-13 15:25:25 +02:00
Kbuild - An extensive rework of kexec and crash Kconfig from Eric DeVolder 2023-08-29 14:53:51 -07:00
Kconfig Add x86 shadow stack support 2023-08-31 12:20:12 -07:00
Kconfig.debug s390/Kconfig.debug: fix indentation 2022-06-01 12:03:15 +02:00
Makefile s390: use obj-y to descend into drivers/s390/ 2023-07-24 12:12:25 +02:00