linux-stable/arch/sh/include
Kees Cook c201cb95ac 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-21 12:37:59 +02:00
..
asm sh: machvec: Use char[] for section boundaries 2022-10-21 12:37:59 +02:00
cpu-common/cpu sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
cpu-sh2/cpu sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
cpu-sh2a/cpu sh: sh7269: Remove bogus SSU GPIO function definitions 2019-12-31 10:01:38 +01:00
cpu-sh3/cpu sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
cpu-sh4/cpu pinctrl: sh-pfc: sh7734: Fix duplicate TCLK1_B 2019-11-01 13:42:52 +01:00
cpu-sh4a/cpu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-common/mach sh: mach-highlander: Fix comment spelling 2020-03-17 20:51:31 +01:00
mach-dreamcast/mach Merge branch 'akpm' (patches from Andrew) 2018-12-28 16:55:46 -08:00
mach-ecovec24/mach sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
mach-kfr2r09/mach sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
mach-landisk/mach License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-migor/mach License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-sdk7786/mach License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-se/mach sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
mach-sh03/mach License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-x3proto/mach License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uapi/asm sh: remove sh5 support 2020-06-01 14:48:52 -04:00