android_kernel_xiaomi_sm7250/arch/sh
Kees Cook 34ef078113 sh: machvec: Use char[] for section boundaries
[ Upstream commit c5783af354688b24abd359f7086c282ec74de993 ]

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:19:24 +02:00
..
boards
boot
cchips
configs
drivers
include sh: machvec: Use char[] for section boundaries 2022-10-26 13:19:24 +02:00
kernel sh: machvec: Use char[] for section boundaries 2022-10-26 13:19:24 +02:00
lib
lib64
math-emu
mm mips,s390,sh,sparc: gup: Work around the "COW can break either way" issue 2022-01-27 09:04:34 +01:00
oprofile
tools
Kconfig
Kconfig.cpu
Kconfig.debug
Makefile