android_kernel_xiaomi_sm7250/arch/sh/include
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
..
asm
cpu-common/cpu
cpu-sh2/cpu
cpu-sh2a/cpu
cpu-sh3/cpu
cpu-sh4/cpu
cpu-sh4a/cpu
cpu-sh5/cpu
mach-common/mach
mach-dreamcast/mach
mach-ecovec24/mach
mach-kfr2r09/mach
mach-landisk/mach
mach-migor/mach
mach-sdk7786/mach
mach-se/mach
mach-sh03/mach
mach-x3proto/mach
uapi/asm