mirror-linux/arch
Heiko Carstens 1fc24f9da2 s390: workaround invalid gcc-11 out of bounds read warning
[ Upstream commit 41e1992665 ]

GCC 11.1.0 and 11.2.0 generate a wrong warning when compiling the
kernel e.g. with allmodconfig:

arch/s390/kernel/setup.c: In function ‘setup_lowcore_dat_on’:
./include/linux/fortify-string.h:57:33: error: ‘__builtin_memcpy’ reading 128 bytes from a region of size 0 [-Werror=stringop-overread]
...
arch/s390/kernel/setup.c:526:9: note: in expansion of macro ‘memcpy’
  526 |         memcpy(abs_lc->cregs_save_area, S390_lowcore.cregs_save_area,
      |         ^~~~~~

This could be addressed by using absolute_pointer() with the
S390_lowcore macro, but this is not a good idea since this generates
worse code for performance critical paths.

Therefore simply use a for loop to copy the array in question and get
rid of the warning.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-06 08:06:33 +01:00
..
alpha alpha: fix syscall entry in !AUDUT_SYSCALL case 2022-12-31 13:31:55 +01:00
arc
arm ARM: omap1: fix building gpio15xx 2023-02-06 08:06:32 +01:00
arm64 arm64: dts: msm8994-angler: fix the memory map 2023-02-06 08:06:32 +01:00
csky
hexagon
ia64 elfcore: Add a cprm parameter to elf_core_extra_{phdrs,data_size} 2023-01-18 11:58:12 +01:00
loongarch LoongArch: Get frame info in unwind_start() when regs is not available 2023-02-06 08:06:32 +01:00
m68k
microblaze
mips of/fdt: run soc memory setup when early_init_dt_scan_memory fails 2023-01-12 12:02:51 +01:00
nios2
openrisc
parisc parisc: Align parisc MADV_XXX constants with all other architectures 2023-01-14 10:33:40 +01:00
powerpc powerpc/imc-pmu: Fix use of mutex in IRQs disabled section 2023-01-18 11:58:21 +01:00
riscv riscv: Move call to init_cpu_topology() to later initialization stage 2023-02-01 08:34:48 +01:00
s390 s390: workaround invalid gcc-11 out of bounds read warning 2023-02-06 08:06:33 +01:00
sh
sparc
um um: virt-pci: Avoid GCC non-NULL warning 2023-01-07 11:11:52 +01:00
x86 perf/x86/amd: fix potential integer overflow on shift of a int 2023-02-01 08:34:51 +01:00
xtensa xtensa: add __umulsidi3 helper 2023-01-07 11:11:46 +01:00
.gitignore
Kconfig ftrace: Allow WITH_ARGS flavour of graph tracer with shadow call stack 2022-12-31 13:32:45 +01:00