linux/arch/sh
Kees Cook 959855093f 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 12:34:36 +02:00
..
boards SH: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:40 +01:00
boot sh: Add missing FORCE prerequisites in Makefile 2021-09-19 10:13:42 +09:00
cchips treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
configs Documentation, arch: Remove leftovers from CIFS_WEAK_PW_HASH 2022-01-27 11:05:21 +01:00
drivers sh: dma: fix kconfig dependency for G2_DMA 2021-01-06 19:55:22 -05:00
include sh: machvec: Use char[] for section boundaries 2022-10-26 12:34:36 +02:00
kernel sh: machvec: Use char[] for section boundaries 2022-10-26 12:34:36 +02:00
lib sh: propage the calling conventions change down to csum_partial_copy_generic() 2020-08-20 15:45:18 -04:00
math-emu sh: math-emu: drop unused functions 2021-11-25 09:48:31 +01:00
mm mm/memory_hotplug: remove nid parameter from arch_remove_memory() 2021-09-08 11:50:23 -07:00
tools sh: Remove SH5-based Cayman platform 2020-08-14 22:05:06 -04:00
Kbuild sh: move core-y in arch/sh/Makefile to arch/sh/Kbuild 2021-05-26 23:11:47 +09:00
Kconfig Tracing updates for 5.15: 2021-09-05 11:50:41 -07:00
Kconfig.cpu docs: sh: convert register-banks.txt to ReST 2020-06-19 14:10:13 -06:00
Kconfig.debug sh: fix kconfig unmet dependency warning for FRAME_POINTER 2021-11-25 09:48:31 +01:00
Makefile sh: move core-y in arch/sh/Makefile to arch/sh/Kbuild 2021-05-26 23:11:47 +09:00