public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <gustavo@embeddedor•com>
To: Stephen Rothwell <sfr@canb•auug.org.au>
Cc: Kees Cook <keescook@chromium•org>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	Linux Next Mailing List <linux-next@vger•kernel.org>,
	David Sterba <dsterba@suse•cz>
Subject: Re: linux-next: build warning after merge of the kspp-gustavo tree
Date: Tue, 22 Jun 2021 18:01:02 -0500	[thread overview]
Message-ID: <22c088e7-1ecf-3dab-de47-23e865d09d1c@embeddedor.com> (raw)
In-Reply-To: <a6770d54-7d40-5c21-2d21-f2e25cc5756e@embeddedor.com>



On 6/22/21 17:46, Gustavo A. R. Silva wrote:
> Hi Stephen,
> 
> I will remove that commit and work on fixing those issues before
> trying again.

Done:

I just removed commit 8d7900f545f1 ("Makefile: Enable -Warray-bounds"):

https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/log/?h=for-next/kspp

Sorry for the noise.

Thanks
--
Gustavo

> 
> Thanks for the report!
> --
> Gustavo
> 
> On 6/22/21 17:39, 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]);  \
>>       |                              ~~~~~~~~~~~~~~~~^~~~~~~~~
>> include/linux/mm.h:1627:48: note: in definition of macro 'page_address'
>>  1627 | #define page_address(page) lowmem_page_address(page)
>>       |                                                ^~~~
>> fs/btrfs/struct-funcs.c:161:1: note: in expansion of macro 'DEFINE_BTRFS_SETGET_BITS'
>>   161 | DEFINE_BTRFS_SETGET_BITS(16)
>>       | ^~~~~~~~~~~~~~~~~~~~~~~~
>> In file included from fs/btrfs/ctree.h:32,
>>                  from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/extent_io.h:97:15: note: while referencing 'pages'
>>    97 |  struct page *pages[INLINE_EXTENT_BUFFER_PAGES];
>>       |               ^~~~~
>> 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_16':
>> fs/btrfs/struct-funcs.c:101:32: warning: array subscript 1 is above array bounds of 'struct page * const[1]' [-Warray-bounds]
>>   101 |  kaddr = page_address(eb->pages[idx + 1]);   \
>>       |                       ~~~~~~~~~^~~~~~~~~
>> include/linux/mm.h:1627:48: note: in definition of macro 'page_address'
>>  1627 | #define page_address(page) lowmem_page_address(page)
>>       |                                                ^~~~
>> fs/btrfs/struct-funcs.c:161:1: note: in expansion of macro 'DEFINE_BTRFS_SETGET_BITS'
>>   161 | DEFINE_BTRFS_SETGET_BITS(16)
>>       | ^~~~~~~~~~~~~~~~~~~~~~~~
>> In file included from fs/btrfs/ctree.h:32,
>>                  from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/extent_io.h:97:15: note: while referencing 'pages'
>>    97 |  struct page *pages[INLINE_EXTENT_BUFFER_PAGES];
>>       |               ^~~~~
>> In file included from fs/btrfs/ctree.h:9,
>>                  from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/struct-funcs.c: In function 'btrfs_set_token_16':
>> fs/btrfs/struct-funcs.c:133:46: warning: array subscript 1 is above array bounds of 'struct page *[1]' [-Warray-bounds]
>>   133 |  token->kaddr = page_address(token->eb->pages[idx + 1]);  \
>>       |                              ~~~~~~~~~~~~~~~~^~~~~~~~~
>> include/linux/mm.h:1627:48: note: in definition of macro 'page_address'
>>  1627 | #define page_address(page) lowmem_page_address(page)
>>       |                                                ^~~~
>> fs/btrfs/struct-funcs.c:161:1: note: in expansion of macro 'DEFINE_BTRFS_SETGET_BITS'
>>   161 | DEFINE_BTRFS_SETGET_BITS(16)
>>       | ^~~~~~~~~~~~~~~~~~~~~~~~
>> In file included from fs/btrfs/ctree.h:32,
>>                  from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/extent_io.h:97:15: note: while referencing 'pages'
>>    97 |  struct page *pages[INLINE_EXTENT_BUFFER_PAGES];
>>       |               ^~~~~
>> In file included from fs/btrfs/ctree.h:9,
>>                  from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/struct-funcs.c: In function 'btrfs_set_16':
>> fs/btrfs/struct-funcs.c:156:32: warning: array subscript 1 is above array bounds of 'struct page * const[1]' [-Warray-bounds]
>>   156 |  kaddr = page_address(eb->pages[idx + 1]);   \
>>       |                       ~~~~~~~~~^~~~~~~~~
>> include/linux/mm.h:1627:48: note: in definition of macro 'page_address'
>>  1627 | #define page_address(page) lowmem_page_address(page)
>>       |                                                ^~~~
>> fs/btrfs/struct-funcs.c:161:1: note: in expansion of macro 'DEFINE_BTRFS_SETGET_BITS'
>>   161 | DEFINE_BTRFS_SETGET_BITS(16)
>>       | ^~~~~~~~~~~~~~~~~~~~~~~~
>> In file included from fs/btrfs/ctree.h:32,
>>                  from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/extent_io.h:97:15: note: while referencing 'pages'
>>    97 |  struct page *pages[INLINE_EXTENT_BUFFER_PAGES];
>>       |               ^~~~~
>> 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_32':
>> 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]);  \
>>       |                              ~~~~~~~~~~~~~~~~^~~~~~~~~
>> include/linux/mm.h:1627:48: note: in definition of macro 'page_address'
>>  1627 | #define page_address(page) lowmem_page_address(page)
>>       |                                                ^~~~
>> fs/btrfs/struct-funcs.c:162:1: note: in expansion of macro 'DEFINE_BTRFS_SETGET_BITS'
>>   162 | DEFINE_BTRFS_SETGET_BITS(32)
>>       | ^~~~~~~~~~~~~~~~~~~~~~~~
>> In file included from fs/btrfs/ctree.h:32,
>>                  from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/extent_io.h:97:15: note: while referencing 'pages'
>>    97 |  struct page *pages[INLINE_EXTENT_BUFFER_PAGES];
>>       |               ^~~~~
>> 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_32':
>> fs/btrfs/struct-funcs.c:101:32: warning: array subscript 1 is above array bounds of 'struct page * const[1]' [-Warray-bounds]
>>   101 |  kaddr = page_address(eb->pages[idx + 1]);   \
>>       |                       ~~~~~~~~~^~~~~~~~~
>> include/linux/mm.h:1627:48: note: in definition of macro 'page_address'
>>  1627 | #define page_address(page) lowmem_page_address(page)
>>       |                                                ^~~~
>> fs/btrfs/struct-funcs.c:162:1: note: in expansion of macro 'DEFINE_BTRFS_SETGET_BITS'
>>   162 | DEFINE_BTRFS_SETGET_BITS(32)
>>       | ^~~~~~~~~~~~~~~~~~~~~~~~
>> In file included from fs/btrfs/ctree.h:32,
>>                  from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/extent_io.h:97:15: note: while referencing 'pages'
>>    97 |  struct page *pages[INLINE_EXTENT_BUFFER_PAGES];
>>       |               ^~~~~
>> In file included from fs/btrfs/ctree.h:9,
>>                  from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/struct-funcs.c: In function 'btrfs_set_token_32':
>> fs/btrfs/struct-funcs.c:133:46: warning: array subscript 1 is above array bounds of 'struct page *[1]' [-Warray-bounds]
>>   133 |  token->kaddr = page_address(token->eb->pages[idx + 1]);  \
>>       |                              ~~~~~~~~~~~~~~~~^~~~~~~~~
>> include/linux/mm.h:1627:48: note: in definition of macro 'page_address'
>>  1627 | #define page_address(page) lowmem_page_address(page)
>>       |                                                ^~~~
>> fs/btrfs/struct-funcs.c:162:1: note: in expansion of macro 'DEFINE_BTRFS_SETGET_BITS'
>>   162 | DEFINE_BTRFS_SETGET_BITS(32)
>>       | ^~~~~~~~~~~~~~~~~~~~~~~~
>> In file included from fs/btrfs/ctree.h:32,
>>                  from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/extent_io.h:97:15: note: while referencing 'pages'
>>    97 |  struct page *pages[INLINE_EXTENT_BUFFER_PAGES];
>>       |               ^~~~~
>> In file included from fs/btrfs/ctree.h:9,
>>                  from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/struct-funcs.c: In function 'btrfs_set_32':
>> fs/btrfs/struct-funcs.c:156:32: warning: array subscript 1 is above array bounds of 'struct page * const[1]' [-Warray-bounds]
>>   156 |  kaddr = page_address(eb->pages[idx + 1]);   \
>>       |                       ~~~~~~~~~^~~~~~~~~
>> include/linux/mm.h:1627:48: note: in definition of macro 'page_address'
>>  1627 | #define page_address(page) lowmem_page_address(page)
>>       |                                                ^~~~
>> fs/btrfs/struct-funcs.c:162:1: note: in expansion of macro 'DEFINE_BTRFS_SETGET_BITS'
>>   162 | DEFINE_BTRFS_SETGET_BITS(32)
>>       | ^~~~~~~~~~~~~~~~~~~~~~~~
>> In file included from fs/btrfs/ctree.h:32,
>>                  from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/extent_io.h:97:15: note: while referencing 'pages'
>>    97 |  struct page *pages[INLINE_EXTENT_BUFFER_PAGES];
>>       |               ^~~~~
>> 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_64':
>> 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]);  \
>>       |                              ~~~~~~~~~~~~~~~~^~~~~~~~~
>> include/linux/mm.h:1627:48: note: in definition of macro 'page_address'
>>  1627 | #define page_address(page) lowmem_page_address(page)
>>       |                                                ^~~~
>> fs/btrfs/struct-funcs.c:163:1: note: in expansion of macro 'DEFINE_BTRFS_SETGET_BITS'
>>   163 | DEFINE_BTRFS_SETGET_BITS(64)
>>       | ^~~~~~~~~~~~~~~~~~~~~~~~
>> In file included from fs/btrfs/ctree.h:32,
>>                  from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/extent_io.h:97:15: note: while referencing 'pages'
>>    97 |  struct page *pages[INLINE_EXTENT_BUFFER_PAGES];
>>       |               ^~~~~
>> 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_64':
>> fs/btrfs/struct-funcs.c:101:32: warning: array subscript 1 is above array bounds of 'struct page * const[1]' [-Warray-bounds]
>>   101 |  kaddr = page_address(eb->pages[idx + 1]);   \
>>       |                       ~~~~~~~~~^~~~~~~~~
>> include/linux/mm.h:1627:48: note: in definition of macro 'page_address'
>>  1627 | #define page_address(page) lowmem_page_address(page)
>>       |                                                ^~~~
>> fs/btrfs/struct-funcs.c:163:1: note: in expansion of macro 'DEFINE_BTRFS_SETGET_BITS'
>>   163 | DEFINE_BTRFS_SETGET_BITS(64)
>>       | ^~~~~~~~~~~~~~~~~~~~~~~~
>> In file included from fs/btrfs/ctree.h:32,
>>                  from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/extent_io.h:97:15: note: while referencing 'pages'
>>    97 |  struct page *pages[INLINE_EXTENT_BUFFER_PAGES];
>>       |               ^~~~~
>> In file included from fs/btrfs/ctree.h:9,
>>                  from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/struct-funcs.c: In function 'btrfs_set_token_64':
>> fs/btrfs/struct-funcs.c:133:46: warning: array subscript 1 is above array bounds of 'struct page *[1]' [-Warray-bounds]
>>   133 |  token->kaddr = page_address(token->eb->pages[idx + 1]);  \
>>       |                              ~~~~~~~~~~~~~~~~^~~~~~~~~
>> include/linux/mm.h:1627:48: note: in definition of macro 'page_address'
>>  1627 | #define page_address(page) lowmem_page_address(page)
>>       |                                                ^~~~
>> fs/btrfs/struct-funcs.c:163:1: note: in expansion of macro 'DEFINE_BTRFS_SETGET_BITS'
>>   163 | DEFINE_BTRFS_SETGET_BITS(64)
>>       | ^~~~~~~~~~~~~~~~~~~~~~~~
>> In file included from fs/btrfs/ctree.h:32,
>>                  from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/extent_io.h:97:15: note: while referencing 'pages'
>>    97 |  struct page *pages[INLINE_EXTENT_BUFFER_PAGES];
>>       |               ^~~~~
>> In file included from fs/btrfs/ctree.h:9,
>>                  from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/struct-funcs.c: In function 'btrfs_set_64':
>> fs/btrfs/struct-funcs.c:156:32: warning: array subscript 1 is above array bounds of 'struct page * const[1]' [-Warray-bounds]
>>   156 |  kaddr = page_address(eb->pages[idx + 1]);   \
>>       |                       ~~~~~~~~~^~~~~~~~~
>> include/linux/mm.h:1627:48: note: in definition of macro 'page_address'
>>  1627 | #define page_address(page) lowmem_page_address(page)
>>       |                                                ^~~~
>> fs/btrfs/struct-funcs.c:163:1: note: in expansion of macro 'DEFINE_BTRFS_SETGET_BITS'
>>   163 | DEFINE_BTRFS_SETGET_BITS(64)
>>       | ^~~~~~~~~~~~~~~~~~~~~~~~
>> In file included from fs/btrfs/ctree.h:32,
>>                  from fs/btrfs/struct-funcs.c:8:
>> fs/btrfs/extent_io.h:97:15: note: while referencing 'pages'
>>    97 |  struct page *pages[INLINE_EXTENT_BUFFER_PAGES];
>>       |               ^~~~~
>> In file included from include/linux/bvec.h:14,
>>                  from include/linux/blk_types.h:10,
>>                  from include/linux/genhd.h:19,
>>                  from include/linux/blkdev.h:8,
>>                  from fs/btrfs/disk-io.c:7:
>> fs/btrfs/disk-io.c: In function 'csum_tree_block':
>> fs/btrfs/disk-io.c:225:34: warning: array subscript 1 is above array bounds of 'struct page *[1]' [-Warray-bounds]
>>   225 |   kaddr = page_address(buf->pages[i]);
>>       |                        ~~~~~~~~~~^~~
>> include/linux/mm.h:1627:48: note: in definition of macro 'page_address'
>>  1627 | #define page_address(page) lowmem_page_address(page)
>>       |                                                ^~~~
>> In file included from fs/btrfs/ctree.h:32,
>>                  from fs/btrfs/disk-io.c:22:
>> fs/btrfs/extent_io.h:97:15: note: while referencing 'pages'
>>    97 |  struct page *pages[INLINE_EXTENT_BUFFER_PAGES];
>>       |               ^~~~~
>>
>> Introduced by commit
>>
>>   8d7900f545f1 ("Makefile: Enable -Warray-bounds")
>>

  reply	other threads:[~2021-06-22 23:47 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 [this message]
2021-06-23  3:03     ` Stephen Rothwell
2021-06-23 13:14 ` David Sterba
2021-06-23 18:39   ` Gustavo A. R. Silva
  -- strict thread matches above, loose matches on Subject: below --
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=22c088e7-1ecf-3dab-de47-23e865d09d1c@embeddedor.com \
    --to=gustavo@embeddedor$(echo .)com \
    --cc=dsterba@suse$(echo .)cz \
    --cc=keescook@chromium$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=sfr@canb$(echo .)auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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