All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: build warning after merge of the kspp-gustavo tree
@ 2021-06-22 22:39 Stephen Rothwell
  2021-06-22 22:46 ` Gustavo A. R. Silva
  2021-06-23 13:14 ` David Sterba
  0 siblings, 2 replies; 17+ messages in thread
From: Stephen Rothwell @ 2021-06-22 22:39 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Kees Cook, Linux Kernel Mailing List, Linux Next Mailing List,
	David Sterba

[-- Attachment #1: Type: text/plain, Size: 13061 bytes --]

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")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread
* linux-next: build warning after merge of the kspp-gustavo tree
@ 2021-07-13  0:22 Stephen Rothwell
  2021-07-13  1:10 ` Gustavo A. R. Silva
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2021-07-13  0:22 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Kees Cook, Jonathan Marek, Rob Clark, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 845 bytes --]

Hi all,

After merging the kspp-gustavo tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

/home/sfr/next/next/drivers/gpu/drm/msm/msm_gem.c: In function 'msm_gem_new_impl':
/home/sfr/next/next/drivers/gpu/drm/msm/msm_gem.c:1170:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
 1170 |   if (priv->has_cached_coherent)
      |      ^
/home/sfr/next/next/drivers/gpu/drm/msm/msm_gem.c:1173:2: note: here
 1173 |  default:
      |  ^~~~~~~

Introduced by commit

  d12e339044a0 ("drm/msm: add MSM_BO_CACHED_COHERENT")

Presumably exposed by commit

  73ffc61f4a8b ("Makefile: Enable -Wimplicit-fallthrough for Clang")

though I am not sure why since I am building with gcc.  The first
commit above introduces a new use of /* fallthrough */

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread
* linux-next: build warning after merge of the kspp-gustavo tree
@ 2021-09-29 23:53 Stephen Rothwell
  2021-09-30  0:05 ` Gustavo A. R. Silva
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2021-09-29 23:53 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Kees Cook, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 11037 bytes --]

Hi all,

After merging the kspp-gustavo tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

kernel/trace/ftrace.c: In function 'ftrace_ops_get_list_func':
kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int,  long unsigned int)' to 'void (*)(long unsigned int,  long unsigned int,  struct ftrace_ops *, struct ftrace_regs *)' [-Wcast-function-type]
  128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
      |                               ^
kernel/trace/ftrace.c:174:10: note: in expansion of macro 'ftrace_ops_list_func'
  174 |   return ftrace_ops_list_func;
      |          ^~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c: In function 'update_ftrace_function':
kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int,  long unsigned int)' to 'void (*)(long unsigned int,  long unsigned int,  struct ftrace_ops *, struct ftrace_regs *)' [-Wcast-function-type]
  128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
      |                               ^
kernel/trace/ftrace.c:207:10: note: in expansion of macro 'ftrace_ops_list_func'
  207 |   func = ftrace_ops_list_func;
      |          ^~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int,  long unsigned int)' to 'void (*)(long unsigned int,  long unsigned int,  struct ftrace_ops *, struct ftrace_regs *)' [-Wcast-function-type]
  128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
      |                               ^
kernel/trace/ftrace.c:220:14: note: in expansion of macro 'ftrace_ops_list_func'
  220 |  if (func == ftrace_ops_list_func) {
      |              ^~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c: In function 'ftrace_modify_all_code':
kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int,  long unsigned int)' to 'void (*)(long unsigned int,  long unsigned int,  struct ftrace_ops *, struct ftrace_regs *)' [-Wcast-function-type]
  128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
      |                               ^
kernel/trace/ftrace.c:2698:35: note: in expansion of macro 'ftrace_ops_list_func'
 2698 |   err = ftrace_update_ftrace_func(ftrace_ops_list_func);
      |                                   ^~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int,  long unsigned int)' to 'void (*)(long unsigned int,  long unsigned int,  struct ftrace_ops *, struct ftrace_regs *)' [-Wcast-function-type]
  128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
      |                               ^
kernel/trace/ftrace.c:2708:41: note: in expansion of macro 'ftrace_ops_list_func'
 2708 |  if (update && ftrace_trace_function != ftrace_ops_list_func) {
      |                                         ^~~~~~~~~~~~~~~~~~~~
In file included from kernel/bpf/hashtab.c:8:
kernel/bpf/hashtab.c: In function 'htab_map_gen_lookup':
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'void * (*)(struct bpf_map *, void *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Wcast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
include/linux/filter.h:374:14: note: in definition of macro 'BPF_EMIT_CALL'
  374 |   .imm   = ((FUNC) - __bpf_call_base) })
      |              ^~~~
kernel/bpf/hashtab.c:671:26: note: in expansion of macro 'BPF_CAST_CALL'
  671 |  *insn++ = BPF_EMIT_CALL(BPF_CAST_CALL(__htab_map_lookup_elem));
      |                          ^~~~~~~~~~~~~
kernel/bpf/hashtab.c: In function 'htab_lru_map_gen_lookup':
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'void * (*)(struct bpf_map *, void *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Wcast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
include/linux/filter.h:374:14: note: in definition of macro 'BPF_EMIT_CALL'
  374 |   .imm   = ((FUNC) - __bpf_call_base) })
      |              ^~~~
kernel/bpf/hashtab.c:712:26: note: in expansion of macro 'BPF_CAST_CALL'
  712 |  *insn++ = BPF_EMIT_CALL(BPF_CAST_CALL(__htab_map_lookup_elem));
      |                          ^~~~~~~~~~~~~
kernel/bpf/hashtab.c: In function 'htab_of_map_gen_lookup':
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'void * (*)(struct bpf_map *, void *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Wcast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
include/linux/filter.h:374:14: note: in definition of macro 'BPF_EMIT_CALL'
  374 |   .imm   = ((FUNC) - __bpf_call_base) })
      |              ^~~~
kernel/bpf/hashtab.c:2400:26: note: in expansion of macro 'BPF_CAST_CALL'
 2400 |  *insn++ = BPF_EMIT_CALL(BPF_CAST_CALL(__htab_map_lookup_elem));
      |                          ^~~~~~~~~~~~~
In file included from include/linux/bpf_verifier.h:9,
                 from kernel/bpf/verifier.c:12:
kernel/bpf/verifier.c: In function 'jit_subprogs':
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'unsigned int (*)(const void *, const struct bpf_insn *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Wcast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12472:16: note: in expansion of macro 'BPF_CAST_CALL'
12472 |    insn->imm = BPF_CAST_CALL(func[subprog]->bpf_func) -
      |                ^~~~~~~~~~~~~
kernel/bpf/verifier.c: In function 'do_misc_fixups':
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'void * (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Wcast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12953:17: note: in expansion of macro 'BPF_CAST_CALL'
12953 |     insn->imm = BPF_CAST_CALL(ops->map_lookup_elem) -
      |                 ^~~~~~~~~~~~~
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *, void *, u64)' {aka 'int (* const)(struct bpf_map *, void *, void *, long long unsigned int)'} to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Wcast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12957:17: note: in expansion of macro 'BPF_CAST_CALL'
12957 |     insn->imm = BPF_CAST_CALL(ops->map_update_elem) -
      |                 ^~~~~~~~~~~~~
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Wcast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12961:17: note: in expansion of macro 'BPF_CAST_CALL'
12961 |     insn->imm = BPF_CAST_CALL(ops->map_delete_elem) -
      |                 ^~~~~~~~~~~~~
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *, u64)' {aka 'int (* const)(struct bpf_map *, void *, long long unsigned int)'} to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Wcast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12965:17: note: in expansion of macro 'BPF_CAST_CALL'
12965 |     insn->imm = BPF_CAST_CALL(ops->map_push_elem) -
      |                 ^~~~~~~~~~~~~
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Wcast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12969:17: note: in expansion of macro 'BPF_CAST_CALL'
12969 |     insn->imm = BPF_CAST_CALL(ops->map_pop_elem) -
      |                 ^~~~~~~~~~~~~
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Wcast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12973:17: note: in expansion of macro 'BPF_CAST_CALL'
12973 |     insn->imm = BPF_CAST_CALL(ops->map_peek_elem) -
      |                 ^~~~~~~~~~~~~
include/linux/filter.h:366:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, u32,  u64)' {aka 'int (* const)(struct bpf_map *, unsigned int,  long long unsigned int)'} to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} [-Wcast-function-type]
  366 |   ((u64 (*)(u64, u64, u64, u64, u64))(x))
      |    ^
kernel/bpf/verifier.c:12977:17: note: in expansion of macro 'BPF_CAST_CALL'
12977 |     insn->imm = BPF_CAST_CALL(ops->map_redirect) -
      |                 ^~~~~~~~~~~~~

Introduced by commit

  ffea83dd8823 ("Makefile: Enable -Wcast-function-type")

Please either fix all these or revert that commit for now.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread
* linux-next: build warning after merge of the kspp-gustavo tree
@ 2023-11-21 22:47 Stephen Rothwell
  2023-11-21 23:07 ` Gustavo A. R. Silva
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2023-11-21 22:47 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 3589 bytes --]

Hi all,

After merging the kspp-gustavo tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

In file included from include/linux/string.h:295,
                 from include/linux/bitmap.h:12,
                 from include/linux/cpumask.h:12,
                 from arch/x86/include/asm/paravirt.h:17,
                 from arch/x86/include/asm/cpuid.h:62,
                 from arch/x86/include/asm/processor.h:19,
                 from arch/x86/include/asm/cpufeature.h:5,
                 from arch/x86/include/asm/thread_info.h:53,
                 from include/linux/thread_info.h:60,
                 from arch/x86/include/asm/preempt.h:9,
                 from include/linux/preempt.h:79,
                 from include/linux/spinlock.h:56,
                 from include/linux/mmzone.h:8,
                 from include/linux/gfp.h:7,
                 from include/linux/firmware.h:7,
                 from drivers/net/wireless/realtek/rtw89/core.h:10,
                 from drivers/net/wireless/realtek/rtw89/coex.h:8,
                 from drivers/net/wireless/realtek/rtw89/coex.c:5:
drivers/net/wireless/realtek/rtw89/coex.c: In function '_append_tdma':
include/linux/fortify-string.h:57:33: warning: writing 8 bytes into a region of size 0 [-Wstringop-overflow=]
   57 | #define __underlying_memcpy     __builtin_memcpy
      |                                 ^
include/linux/fortify-string.h:644:9: note: in expansion of macro '__underlying_memcpy'
  644 |         __underlying_##op(p, q, __fortify_size);                        \
      |         ^~~~~~~~~~~~~
include/linux/fortify-string.h:689:26: note: in expansion of macro '__fortify_memcpy_chk'
  689 | #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
      |                          ^~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/realtek/rtw89/coex.c:1585:17: note: in expansion of macro 'memcpy'
 1585 |                 memcpy(&v3->tdma, &dm->tdma, sizeof(v3->tdma));
      |                 ^~~~~~
drivers/net/wireless/realtek/rtw89/core.h:2703:37: note: at offset [5714, 71249] into destination object 'ver' of size 8
 2703 |         const struct rtw89_btc_ver *ver;
      |                                     ^~~
include/linux/fortify-string.h:57:33: warning: writing 8 bytes into a region of size 0 [-Wstringop-overflow=]
   57 | #define __underlying_memcpy     __builtin_memcpy
      |                                 ^
include/linux/fortify-string.h:644:9: note: in expansion of macro '__underlying_memcpy'
  644 |         __underlying_##op(p, q, __fortify_size);                        \
      |         ^~~~~~~~~~~~~
include/linux/fortify-string.h:689:26: note: in expansion of macro '__fortify_memcpy_chk'
  689 | #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
      |                          ^~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/realtek/rtw89/coex.c:1579:17: note: in expansion of macro 'memcpy'
 1579 |                 memcpy(v, &dm->tdma, sizeof(*v));
      |                 ^~~~~~
drivers/net/wireless/realtek/rtw89/core.h:2703:37: note: at offset [5710, 71245] into destination object 'ver' of size 8
 2703 |         const struct rtw89_btc_ver *ver;
      |                                     ^~~

Exposed by commit

  1b56c90018f0 ("Makefile: Enable -Wstringop-overflow globally")

This is with your tree on top of Linus' tree (and some fix patches but
nothing that obviously touches anything relevent) and CONFIG_WERROR
not set.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread
* linux-next: build warning after merge of the kspp-gustavo tree
@ 2023-11-21 22:50 Stephen Rothwell
  2023-11-21 23:19 ` Gustavo A. R. Silva
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2023-11-21 22:50 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1146 bytes --]

Hi all,

After merging the kspp-gustavo tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

In function 'aspeed_create_fan_tach_channel',
    inlined from 'aspeed_create_fan' at drivers/hwmon/aspeed-pwm-tacho.c:877:2,
    inlined from 'aspeed_pwm_tacho_probe' at drivers/hwmon/aspeed-pwm-tacho.c:936:9:
drivers/hwmon/aspeed-pwm-tacho.c:751:49: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  751 |                 priv->fan_tach_ch_source[index] = pwm_source;
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
drivers/hwmon/aspeed-pwm-tacho.c: In function 'aspeed_pwm_tacho_probe':
drivers/hwmon/aspeed-pwm-tacho.c:193:12: note: at offset [48, 255] into destination object 'fan_tach_ch_source' of size 16
  193 |         u8 fan_tach_ch_source[16];
      |            ^~~~~~~~~~~~~~~~~~

Exposed by commit

  1b56c90018f0 ("Makefile: Enable -Wstringop-overflow globally")

This is with your tree on top of Linus' tree (and some fix patches but
nothing that obviously touches anything relevent) and CONFIG_WERROR
not set.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-11-21 23:23 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.