linux-stable/arch/sh
Kees Cook 8010fece7c 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-24 09:57:02 +02:00
..
boards mmc: sh_mmcif: move platform_data header to proper location 2022-04-26 14:05:21 +02:00
boot mmc: sh_mmcif: move platform_data header to proper location 2022-04-26 14:05:21 +02:00
cchips
configs binfmt_flat: Remove shared library support 2022-04-22 10:57:18 -07:00
drivers PCI: Add defines for normal and subtractive PCI bridges 2022-02-17 15:29:35 -06:00
include sh: machvec: Use char[] for section boundaries 2022-10-24 09:57:02 +02:00
kernel sh: machvec: Use char[] for section boundaries 2022-10-24 09:57:02 +02:00
lib
math-emu sh: fix READ/WRITE redefinition warnings 2021-10-27 16:51:32 -04:00
mm proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
tools
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig asm-generic updates for 5.18 2022-03-23 18:03:08 -07:00
Kconfig.cpu
Kconfig.debug sh: fix kconfig unmet dependency warning for FRAME_POINTER 2021-10-27 16:51:01 -04:00
Makefile kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00