linux-stable/arch/s390
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
..
appldata License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
boot License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
configs s390: fix zfcpdump-config 2017-10-16 08:19:01 +02:00
crypto s390/archrandom: simplify back to earlier design and initialize earlier 2022-07-07 17:31:16 +02:00
hypfs s390/hypfs: avoid error message under KVM 2022-09-05 10:25:07 +02:00
include s390/vx: fix save/restore of fpu kernel context 2024-01-08 11:25:02 +01:00
kernel treewide: Remove uninitialized_var() usage 2023-08-11 11:33:32 +02:00
kvm KVM: s390: vsie: Fix the initialization of the epoch extension (epdx) field 2022-12-14 11:26:13 +01:00
lib s390/uaccess: add missing earlyclobber annotations to __clear_user() 2023-04-05 11:14:21 +02:00
mm KVM: s390/mm: Properly reset no-dat 2023-12-13 16:46:17 +01:00
net s390/bpf: Fix optimizing out zero-extensions 2021-09-26 13:37:27 +02:00
numa s390/mm: Fix ERROR: "__node_distance" undefined! 2018-11-27 16:10:48 +01:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci s390/pci: fix iommu bitmap allocation 2023-10-25 11:13:33 +02:00
tools License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kbuild
Kconfig s390: appldata depends on PROC_SYSCTL 2021-07-20 16:17:40 +02:00
Kconfig.debug License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile s390: add automatic detection of the spectre defense 2018-04-29 11:33:15 +02:00
defconfig