[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240523130026.c57a8e1e7f4140d2642c84d2@linux-foundation.org>
Date: Thu, 23 May 2024 13:00:26 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Yury Norov <yury.norov@...il.com>
Cc: linux-kernel@...r.kernel.org, Petr Mladek <pmladek@...e.com>, Masahiro
Yamada <masahiroy@...nel.org>, Randy Dunlap <rdunlap@...radead.org>, Yoann
Congal <yoann.congal@...le.fr>, "Gustavo A. R. Silva"
<gustavoars@...nel.org>, Nhat Pham <nphamcs@...il.com>, Vincent Guittot
<vincent.guittot@...aro.org>, Alexander Lobakin
<aleksander.lobakin@...el.com>, "David S . Miller" <davem@...emloft.net>
Subject: Re: [PATCH] gcc: disable '-Warray-bounds' for gcc-9
On Wed, 22 May 2024 15:58:30 -0700 Yury Norov <yury.norov@...il.com> wrote:
> '-Warray-bounds' is already disabled for gcc-10+. Now that we've merged
> bitmap_{read,write), I see the following error when building the kernel
> with gcc-9.4 (Ubuntu 20.04.4 LTS) for x86_64 allmodconfig:
>
> drivers/pinctrl/pinctrl-cy8c95x0.c: In function ‘cy8c95x0_read_regs_mask.isra.0’:
> include/linux/bitmap.h:756:18: error: array subscript [1, 288230376151711744] is outside array bounds of ‘long unsigned int[1]’ [-Werror=array-bounds]
> 756 | value_high = map[index + 1] & BITMAP_LAST_WORD_MASK(start + nbits);
> | ~~~^~~~~~~~~~~
>
> The immediate reason is that the commit b44759705f7d ("bitmap: make
> bitmap_{get,set}_value8() use bitmap_{read,write}()") switched the
> bitmap_get_value8() to an alias of bitmap_read(); the same for 'set'.
So it seems that all kernels which contain b44759705f7d should have
this change? If so, and as b44759705f7d appears to be in the net tree
then the net tree is a suitable place to carry this patch?
Or I can send it into Linus this -rc cycle and things will sort themselves out.
Thoughts?
Powered by blists - more mailing lists