From: Kees Cook <keescook@chromium.org>
To: Arnd Bergmann <arnd@linaro.org>
Cc: ci_notify@linaro.org,
Lists linaro-kernel <linaro-kernel@lists.linaro.org>,
linux-hardening@vger.kernel.org
Subject: Re: [TCWG CI] Regression caused by linux: Makefile: Enable -Warray-bounds
Date: Mon, 31 Jan 2022 23:52:19 -0800 [thread overview]
Message-ID: <202201312351.915CAD5A5@keescook> (raw)
In-Reply-To: <CAK8P3a1CT+-3J7Ufv9TQwRiV4i_+FF=-+phwSjWafyGuPfG+AA@mail.gmail.com>
On Tue, Feb 01, 2022 at 08:17:50AM +0100, Arnd Bergmann wrote:
> On Mon, Jan 31, 2022 at 11:30 PM Kees Cook <keescook@chromium.org> wrote:
> > On Sun, Jan 30, 2022 at 01:00:43AM +0000, ci_notify@linaro.org wrote:
> >
> > For example, extracting from the build log, I can see more:
> >
> > > 00:00:53 In file included from ./include/linux/io.h:13,
> > > 00:00:53 from arch/arm/mach-cns3xxx/pm.c:8:
> > > 00:00:53 In function ‘__raw_readl’,
> > > 00:00:53 inlined from ‘cns3xxx_pwr_clk_en’ at arch/arm/mach-cns3xxx/pm.c:17:12:
> > > 00:00:53 ./arch/arm/include/asm/io.h:113:9: error: array subscript 0 is outside array bounds of ‘const volatile void[0]’ [-Werror=array-bounds]
> > > 00:00:53 113 | asm volatile("ldr %0, %1"
> > > 00:00:53 | ^~~
> >
> > Looks like something sees a "void" type... this smells like a compiler
> > bug. I haven't been able to reproduce this warning yet.
>
> I suspect this is a variation of
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578
>
> When gcc sees a pointer dereference of a literal address like *(int
> *)(void *)0x1234000,
> this is sometimes interpreted as a NULL pointer with an offset, which
> in turn is
> assumed to have zero bytes that can be dereferenced.
Eww.
I still can't reproduce this error myself. Any hints on compiler
versions?
--
Kees Cook
next prev parent reply other threads:[~2022-02-01 7:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <809699127.18214.1643504444637@jenkins.jenkins>
2022-01-31 22:30 ` [TCWG CI] Regression caused by linux: Makefile: Enable -Warray-bounds Kees Cook
2022-02-01 7:17 ` Arnd Bergmann
2022-02-01 7:52 ` Kees Cook [this message]
2022-02-01 9:03 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202201312351.915CAD5A5@keescook \
--to=keescook@chromium.org \
--cc=arnd@linaro.org \
--cc=ci_notify@linaro.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-hardening@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.