From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: dsterba@suse.cz, Stephen Rothwell <sfr@canb.auug.org.au>,
Kees Cook <keescook@chromium.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build warning after merge of the kspp-gustavo tree
Date: Wed, 23 Jun 2021 13:39:49 -0500 [thread overview]
Message-ID: <9f18da33-7446-7237-91be-e52a274877d8@embeddedor.com> (raw)
In-Reply-To: <20210623131455.GM28158@suse.cz>
On 6/23/21 08:14, David Sterba wrote:
> On Wed, Jun 23, 2021 at 08:39:01AM +1000, Stephen Rothwell wrote:
>> Hi all,
>>
>> After merging the kspp-gustavo tree, today's linux-next build (powerpc
>> ppc64_defconfig) produced this warning:
>>
>> In file included from fs/btrfs/ctree.h:9,
>> from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/struct-funcs.c: In function 'btrfs_get_token_16':
>> fs/btrfs/struct-funcs.c:80:46: warning: array subscript 1 is above array bounds of 'struct page *[1]' [-Warray-bounds]
>> 80 | token->kaddr = page_address(token->eb->pages[idx + 1]); \
>> | ~~~~~~~~~~~~~~~~^~~~~~~~~
>
> The warning is correct, on powerpc and 64k pages the array has only 1
> item, ie. only index 0 is valid. The overflow won't happen in practice
> though because of previous branch that would happen in 100% cases. The
> code handles when some bytes cross 2 pages but on 64k pages it's all
> just one page.
>
> To allow the warning to be enabled globally we'll fix it, I'll let
> Gustavo know once it's done.
Awesome. :)
Thanks, David.
--
Gustavo
next prev parent reply other threads:[~2021-06-23 19:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-22 22:39 linux-next: build warning after merge of the kspp-gustavo tree Stephen Rothwell
2021-06-22 22:46 ` Gustavo A. R. Silva
2021-06-22 23:01 ` Gustavo A. R. Silva
2021-06-23 3:03 ` Stephen Rothwell
2021-06-23 13:14 ` David Sterba
2021-06-23 18:39 ` Gustavo A. R. Silva [this message]
2021-07-13 0:22 Stephen Rothwell
2021-07-13 1:10 ` Gustavo A. R. Silva
2021-07-13 2:39 ` Gustavo A. R. Silva
2021-09-29 23:53 Stephen Rothwell
2021-09-30 0:05 ` Gustavo A. R. Silva
2023-11-21 22:47 Stephen Rothwell
2023-11-21 23:07 ` Gustavo A. R. Silva
2023-11-21 23:19 ` Stephen Rothwell
2023-11-21 23:23 ` Gustavo A. R. Silva
2023-11-21 22:50 Stephen Rothwell
2023-11-21 23:19 ` Gustavo A. R. Silva
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=9f18da33-7446-7237-91be-e52a274877d8@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=dsterba@suse.cz \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).