linux-kernel.vger.kernel.org archive mirror
 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 17:46:25 -0500	[thread overview]
Message-ID: <a6770d54-7d40-5c21-2d21-f2e25cc5756e@embeddedor.com> (raw)
In-Reply-To: <20210623083901.1d49d19d@canb.auug.org.au>

Hi Stephen,

I will remove that commit and work on fixing those issues before
trying again.

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:07 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 [this message]
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
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=a6770d54-7d40-5c21-2d21-f2e25cc5756e@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).