linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [congwang:sch_bpf2 2/2] kernel/bpf/btf.c:4422:9: error: initialized field overwritten
@ 2021-09-13  3:03 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-09-13  3:03 UTC (permalink / raw)
  To: Cong Wang; +Cc: kbuild-all, linux-kernel

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

tree:   https://github.com/congwang/linux.git sch_bpf2
head:   605f886c8f746c2b592e404357408911e7e05ee6
commit: 605f886c8f746c2b592e404357408911e7e05ee6 [2/2] net_sched: introduce eBPF based Qdisc
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-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://github.com/congwang/linux/commit/605f886c8f746c2b592e404357408911e7e05ee6
        git remote add congwang https://github.com/congwang/linux.git
        git fetch --no-tags congwang sch_bpf2
        git checkout 605f886c8f746c2b592e404357408911e7e05ee6
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=xtensa 

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

All errors (new ones prefixed by >>):

>> kernel/bpf/btf.c:4422:9: error: initialized field overwritten [-Werror=override-init]
    4422 |         0, /* avoid empty array */
         |         ^
   kernel/bpf/btf.c:4422:9: note: (near initialization for 'bpf_ctx_convert_map[32]')
   kernel/bpf/btf.c: In function 'btf_seq_show':
   kernel/bpf/btf.c:5748:29: error: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]
    5748 |         seq_vprintf((struct seq_file *)show->target, fmt, args);
         |                             ^~~~~~~~
   kernel/bpf/btf.c: In function 'btf_snprintf_show':
   kernel/bpf/btf.c:5785:9: error: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]
    5785 |         len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
         |         ^~~
   cc1: all warnings being treated as errors


vim +4422 kernel/bpf/btf.c

91cc1a99740e2e Alexei Starovoitov 2019-11-14  4396  
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4397  #define BPF_MAP_TYPE(_id, _ops)
f2e10bff16a0fd Andrii Nakryiko    2020-04-28  4398  #define BPF_LINK_TYPE(_id, _name)
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4399  static union {
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4400  	struct bpf_ctx_convert {
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4401  #define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type) \
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4402  	prog_ctx_type _id##_prog; \
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4403  	kern_ctx_type _id##_kern;
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4404  #include <linux/bpf_types.h>
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4405  #undef BPF_PROG_TYPE
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4406  	} *__t;
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4407  	/* 't' is written once under lock. Read many times. */
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4408  	const struct btf_type *t;
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4409  } bpf_ctx_convert;
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4410  enum {
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4411  #define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type) \
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4412  	__ctx_convert##_id,
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4413  #include <linux/bpf_types.h>
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4414  #undef BPF_PROG_TYPE
ce27709b8162e5 Alexei Starovoitov 2019-11-27  4415  	__ctx_convert_unused, /* to avoid empty enum in extreme .config */
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4416  };
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4417  static u8 bpf_ctx_convert_map[] = {
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4418  #define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type) \
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4419  	[_id] = __ctx_convert##_id,
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4420  #include <linux/bpf_types.h>
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4421  #undef BPF_PROG_TYPE
4c80c7bc583a87 Arnd Bergmann      2019-12-10 @4422  	0, /* avoid empty array */
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4423  };
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4424  #undef BPF_MAP_TYPE
f2e10bff16a0fd Andrii Nakryiko    2020-04-28  4425  #undef BPF_LINK_TYPE
91cc1a99740e2e Alexei Starovoitov 2019-11-14  4426  

:::::: The code at line 4422 was first introduced by commit
:::::: 4c80c7bc583a87ded5f61906f81256b57c795806 bpf: Fix build in minimal configurations, again

:::::: TO: Arnd Bergmann <arnd@arndb.de>
:::::: CC: Daniel Borkmann <daniel@iogearbox.net>

---
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: 68777 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-13  3:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13  3:03 [congwang:sch_bpf2 2/2] kernel/bpf/btf.c:4422:9: error: initialized field overwritten 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).