linux-stable/arch/sh
Kees Cook 5abd2626ca sh: machvec: Use char[] for section boundaries
[ Upstream commit c5783af354 ]

As done for other sections, define the extern as a character array,
which relaxes many of the compiler-time object size checks, which would
otherwise assume it's a single long. Solves the following build error:

arch/sh/kernel/machvec.c: error: array subscript 'struct sh_machine_vector[0]' is partly outside array bounds of 'long int[1]' [-Werror=array-bounds]:  => 105:33

Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: linux-sh@vger.kernel.org
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/lkml/alpine.DEB.2.22.394.2209050944290.964530@ramsan.of.borg/
Fixes: 9655ad03af ("sh: Fixup machvec support.")
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Acked-by: Rich Felker <dalias@libc.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-26 13:22:21 +02:00
..
boards sh: landisk: Add missing initialization of sh_io_port_base 2020-08-21 13:05:38 +02:00
boot treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
cchips treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
configs scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:57 +02:00
drivers sh: dma: fix kconfig dependency for G2_DMA 2021-01-27 11:47:52 +01:00
include sh: machvec: Use char[] for section boundaries 2022-10-26 13:22:21 +02:00
kernel sh: machvec: Use char[] for section boundaries 2022-10-26 13:22:21 +02:00
lib sh: lib: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
lib64
math-emu sh: math-emu: drop unused functions 2021-11-26 10:47:17 +01:00
mm mm/memory_hotplug: shrink zones when offlining memory 2020-01-09 10:19:56 +01:00
oprofile treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
tools kbuild: remove redundant target cleaning on failure 2019-01-06 09:46:51 +09:00
Kconfig dma-mapping: remove CONFIG_ARCH_NO_COHERENT_DMA_MMAP 2019-09-04 11:13:18 +02:00
Kconfig.cpu
Kconfig.debug sh: fix kconfig unmet dependency warning for FRAME_POINTER 2021-11-26 10:47:17 +01:00
Makefile treewide: prefix header search paths with $(srctree)/ 2019-05-18 11:49:57 +09:00