linux-stable/arch
Vasily Gorbik a478952a8a s390: avoid using global register for current_stack_pointer
[ Upstream commit e3c11025bc ]

Commit 30de14b188 ("s390: current_stack_pointer shouldn't be a
function") made current_stack_pointer a global register variable like
on many other architectures. Unfortunately on s390 it uncovers old
gcc bug which is fixed only since gcc-9.1 [gcc commit 3ad7fed1cc87
("S/390: Fix PR89775. Stackpointer save/restore instructions removed")]
and backported to gcc-8.4 and later. Due to this bug gcc versions prior
to 8.4 generate broken code which leads to stack corruptions.

Current minimal gcc version required to build the kernel is declared
as 5.1. It is not possible to fix all old gcc versions, so work
around this problem by avoiding using global register variable for
current_stack_pointer.

Fixes: 30de14b188 ("s390: current_stack_pointer shouldn't be a function")
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-11-26 09:27:39 +01:00
..
alpha
arc arc: iounmap() arg is volatile 2022-11-04 00:00:27 +09:00
arm ARM: dts: imx7: Fix NAND controller size-cells 2022-11-26 09:27:31 +01:00
arm64 arm64: dts: imx93-pinfunc: drop execution permission 2022-11-26 09:27:32 +01:00
csky
hexagon
ia64 ia64: export memory_add_physaddr_to_nid to fix cxl build error 2022-10-21 12:38:34 +02:00
loongarch LoongArch: Clean up loongson3_smp_ops declaration 2022-09-29 10:15:00 +08:00
m68k m68k: Rework BI_VIRT_RNG_SEED as BI_RNG_SEED 2022-11-16 10:03:48 +01:00
microblaze
mips MIPS: Loongson64: Add WARN_ON on kexec related kmalloc failed 2022-11-26 09:27:33 +01:00
nios2
openrisc
parisc parisc: Avoid printing the hardware path twice 2022-11-10 18:17:36 +01:00
powerpc powerpc/64e: Fix amdgpu build on Book3E w/o AltiVec 2022-11-26 09:27:19 +01:00
riscv riscv: fix reserved memory setup 2022-11-16 10:04:04 +01:00
s390 s390: avoid using global register for current_stack_pointer 2022-11-26 09:27:39 +01:00
sh sh: machvec: Use char[] for section boundaries 2022-10-21 12:37:59 +02:00
sparc sparc: Unbreak the build 2022-10-12 09:39:04 +02:00
um UM: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK 2022-10-21 12:37:40 +02:00
x86 KVM: SVM: move MSR_IA32_SPEC_CTRL save/restore to assembly 2022-11-26 09:27:23 +01:00
xtensa
.gitignore
Kconfig asm-generic: Conditionally enable do_softirq_own_stack() via Kconfig. 2022-09-05 17:20:55 +02:00