linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(struct bpf_map *, u32,  u64)' {aka 'int (*)(struct bpf_map *, unsigned int,  long long unsigned int)'} to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long...
@ 2021-08-13 15:54 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-08-13 15:54 UTC (permalink / raw)
  To: Björn Töpel; +Cc: kbuild-all, linux-kernel, Daniel Borkmann

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f8e6dfc64f6135d1b6c5215c14cd30b9b60a0008
commit: e6a4750ffe9d701c4d55212b14b615e63571d235 bpf, xdp: Make bpf_redirect_map() a map operation
date:   5 months ago
config: powerpc64-buildonly-randconfig-r002-20210812 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e6a4750ffe9d701c4d55212b14b615e63571d235
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout e6a4750ffe9d701c4d55212b14b615e63571d235
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   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:363:18: 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]
     363 |                 ((u64 (*)(u64, u64, u64, u64, u64))(x))
         |                  ^
   kernel/bpf/verifier.c:11662:37: note: in expansion of macro 'BPF_CAST_CALL'
   11662 |                         insn->imm = BPF_CAST_CALL(func[subprog]->bpf_func) -
         |                                     ^~~~~~~~~~~~~
   kernel/bpf/verifier.c: In function 'do_misc_fixups':
   include/linux/filter.h:363:18: 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]
     363 |                 ((u64 (*)(u64, u64, u64, u64, u64))(x))
         |                  ^
   kernel/bpf/verifier.c:12070:45: note: in expansion of macro 'BPF_CAST_CALL'
   12070 |                                 insn->imm = BPF_CAST_CALL(ops->map_lookup_elem) -
         |                                             ^~~~~~~~~~~~~
   include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(struct bpf_map *, void *, void *, u64)' {aka 'int (*)(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]
     363 |                 ((u64 (*)(u64, u64, u64, u64, u64))(x))
         |                  ^
   kernel/bpf/verifier.c:12074:45: note: in expansion of macro 'BPF_CAST_CALL'
   12074 |                                 insn->imm = BPF_CAST_CALL(ops->map_update_elem) -
         |                                             ^~~~~~~~~~~~~
   include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(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]
     363 |                 ((u64 (*)(u64, u64, u64, u64, u64))(x))
         |                  ^
   kernel/bpf/verifier.c:12078:45: note: in expansion of macro 'BPF_CAST_CALL'
   12078 |                                 insn->imm = BPF_CAST_CALL(ops->map_delete_elem) -
         |                                             ^~~~~~~~~~~~~
   include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(struct bpf_map *, void *, u64)' {aka 'int (*)(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]
     363 |                 ((u64 (*)(u64, u64, u64, u64, u64))(x))
         |                  ^
   kernel/bpf/verifier.c:12082:45: note: in expansion of macro 'BPF_CAST_CALL'
   12082 |                                 insn->imm = BPF_CAST_CALL(ops->map_push_elem) -
         |                                             ^~~~~~~~~~~~~
   include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(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]
     363 |                 ((u64 (*)(u64, u64, u64, u64, u64))(x))
         |                  ^
   kernel/bpf/verifier.c:12086:45: note: in expansion of macro 'BPF_CAST_CALL'
   12086 |                                 insn->imm = BPF_CAST_CALL(ops->map_pop_elem) -
         |                                             ^~~~~~~~~~~~~
   include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(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]
     363 |                 ((u64 (*)(u64, u64, u64, u64, u64))(x))
         |                  ^
   kernel/bpf/verifier.c:12090:45: note: in expansion of macro 'BPF_CAST_CALL'
   12090 |                                 insn->imm = BPF_CAST_CALL(ops->map_peek_elem) -
         |                                             ^~~~~~~~~~~~~
>> include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(struct bpf_map *, u32,  u64)' {aka 'int (*)(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]
     363 |                 ((u64 (*)(u64, u64, u64, u64, u64))(x))
         |                  ^
   kernel/bpf/verifier.c:12094:45: note: in expansion of macro 'BPF_CAST_CALL'
   12094 |                                 insn->imm = BPF_CAST_CALL(ops->map_redirect) -
         |                                             ^~~~~~~~~~~~~


vim +363 include/linux/filter.h

f8f6d679aaa78b Daniel Borkmann 2014-05-29  361  
09772d92cd5ad9 Daniel Borkmann 2018-06-02  362  #define BPF_CAST_CALL(x)					\
09772d92cd5ad9 Daniel Borkmann 2018-06-02 @363  		((u64 (*)(u64, u64, u64, u64, u64))(x))
09772d92cd5ad9 Daniel Borkmann 2018-06-02  364  

:::::: The code at line 363 was first introduced by commit
:::::: 09772d92cd5ad998b0d5f6f46cd1658f8cb698cf bpf: avoid retpoline for lookup/update/delete calls on maps

:::::: TO: Daniel Borkmann <daniel@iogearbox.net>
:::::: CC: Alexei Starovoitov <ast@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31206 bytes --]

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

* include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(struct bpf_map *, u32,  u64)' {aka 'int (*)(struct bpf_map *, unsigned int,  long long unsigned int)'} to 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long...
@ 2021-09-28  7:55 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-09-28  7:55 UTC (permalink / raw)
  To: Björn Töpel; +Cc: kbuild-all, linux-kernel, Daniel Borkmann

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   92477dd1faa650e50bd3bb35a6c0b8d09198cc35
commit: e6a4750ffe9d701c4d55212b14b615e63571d235 bpf, xdp: Make bpf_redirect_map() a map operation
date:   7 months ago
config: nds32-buildonly-randconfig-r002-20210927 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e6a4750ffe9d701c4d55212b14b615e63571d235
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout e6a4750ffe9d701c4d55212b14b615e63571d235
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nds32 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   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:363:18: 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]
     363 |                 ((u64 (*)(u64, u64, u64, u64, u64))(x))
         |                  ^
   kernel/bpf/verifier.c:11662:37: note: in expansion of macro 'BPF_CAST_CALL'
   11662 |                         insn->imm = BPF_CAST_CALL(func[subprog]->bpf_func) -
         |                                     ^~~~~~~~~~~~~
   kernel/bpf/verifier.c: In function 'do_misc_fixups':
   include/linux/filter.h:363:18: 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]
     363 |                 ((u64 (*)(u64, u64, u64, u64, u64))(x))
         |                  ^
   kernel/bpf/verifier.c:12070:45: note: in expansion of macro 'BPF_CAST_CALL'
   12070 |                                 insn->imm = BPF_CAST_CALL(ops->map_lookup_elem) -
         |                                             ^~~~~~~~~~~~~
   include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(struct bpf_map *, void *, void *, u64)' {aka 'int (*)(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]
     363 |                 ((u64 (*)(u64, u64, u64, u64, u64))(x))
         |                  ^
   kernel/bpf/verifier.c:12074:45: note: in expansion of macro 'BPF_CAST_CALL'
   12074 |                                 insn->imm = BPF_CAST_CALL(ops->map_update_elem) -
         |                                             ^~~~~~~~~~~~~
   include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(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]
     363 |                 ((u64 (*)(u64, u64, u64, u64, u64))(x))
         |                  ^
   kernel/bpf/verifier.c:12078:45: note: in expansion of macro 'BPF_CAST_CALL'
   12078 |                                 insn->imm = BPF_CAST_CALL(ops->map_delete_elem) -
         |                                             ^~~~~~~~~~~~~
   include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(struct bpf_map *, void *, u64)' {aka 'int (*)(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]
     363 |                 ((u64 (*)(u64, u64, u64, u64, u64))(x))
         |                  ^
   kernel/bpf/verifier.c:12082:45: note: in expansion of macro 'BPF_CAST_CALL'
   12082 |                                 insn->imm = BPF_CAST_CALL(ops->map_push_elem) -
         |                                             ^~~~~~~~~~~~~
   include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(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]
     363 |                 ((u64 (*)(u64, u64, u64, u64, u64))(x))
         |                  ^
   kernel/bpf/verifier.c:12086:45: note: in expansion of macro 'BPF_CAST_CALL'
   12086 |                                 insn->imm = BPF_CAST_CALL(ops->map_pop_elem) -
         |                                             ^~~~~~~~~~~~~
   include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(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]
     363 |                 ((u64 (*)(u64, u64, u64, u64, u64))(x))
         |                  ^
   kernel/bpf/verifier.c:12090:45: note: in expansion of macro 'BPF_CAST_CALL'
   12090 |                                 insn->imm = BPF_CAST_CALL(ops->map_peek_elem) -
         |                                             ^~~~~~~~~~~~~
>> include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(struct bpf_map *, u32,  u64)' {aka 'int (*)(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]
     363 |                 ((u64 (*)(u64, u64, u64, u64, u64))(x))
         |                  ^
   kernel/bpf/verifier.c:12094:45: note: in expansion of macro 'BPF_CAST_CALL'
   12094 |                                 insn->imm = BPF_CAST_CALL(ops->map_redirect) -
         |                                             ^~~~~~~~~~~~~


vim +363 include/linux/filter.h

f8f6d679aaa78b Daniel Borkmann 2014-05-29  361  
09772d92cd5ad9 Daniel Borkmann 2018-06-02  362  #define BPF_CAST_CALL(x)					\
09772d92cd5ad9 Daniel Borkmann 2018-06-02 @363  		((u64 (*)(u64, u64, u64, u64, u64))(x))
09772d92cd5ad9 Daniel Borkmann 2018-06-02  364  

:::::: The code at line 363 was first introduced by commit
:::::: 09772d92cd5ad998b0d5f6f46cd1658f8cb698cf bpf: avoid retpoline for lookup/update/delete calls on maps

:::::: TO: Daniel Borkmann <daniel@iogearbox.net>
:::::: CC: Alexei Starovoitov <ast@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28194 bytes --]

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

end of thread, other threads:[~2021-09-28  7:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-13 15:54 include/linux/filter.h:363:18: warning: cast between incompatible function types from 'int (*)(struct bpf_map *, u32, u64)' {aka 'int (*)(struct bpf_map *, unsigned int, long long unsigned int)'} to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long kernel test robot
2021-09-28  7:55 kernel test robot

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