Re: [PATCH] init/Kconfig: Lower GCC version check for -Warray-bounds

From: Paul Moore
Date: Fri Feb 23 2024 - 14:11:43 EST


On Fri, Feb 23, 2024 at 12:08 PM Kees Cook <keescook@xxxxxxxxxxxx> wrote:
>
> We continue to see false positives from -Warray-bounds even in GCC 10,
> which is getting reported in a few places[1] still:
>
> security/security.c:811:2: warning: ‘memcpy’ offset 32 is out of the bounds [0, 0] [-Warray-bounds]
>
> Lower the GCC version check from 11 to 10.
>
> Reported-by: Lu Yao <yaolu@xxxxxxxxxx>
> Closes: https://lore.kernel.org/lkml/20240117014541.8887-1-yaolu@xxxxxxxxxx/
> Link: https://lore.kernel.org/linux-next/65d84438.620a0220.7d171.81a7@xxxxxxxxxxxxx [1]
> Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
> ---
> Cc: Masahiro Yamada <masahiroy@xxxxxxxxxx>
> Cc: Paul Moore <paul@xxxxxxxxxxxxxx>
> Cc: Gustavo A. R. Silva <gustavoars@xxxxxxxxxx>
> Cc: Nathan Chancellor <nathan@xxxxxxxxxx>
> Cc: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
> Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
> ---
> init/Kconfig | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)

Thanks Kees.

Reviewed-by: Paul Moore <paul@xxxxxxxxxxxxxx>

--
paul-moore.com