From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3549516732366145948==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH bpf-next v4 3/3] bpf: remove the cgroup -> bpf header dependecy Date: Thu, 16 Dec 2021 07:59:08 +0800 Message-ID: <202112160742.WbIAtZxD-lkp@intel.com> In-Reply-To: <20211215181231.1053479-4-kuba@kernel.org> List-Id: --===============3549516732366145948== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Jakub, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Jakub-Kicinski/bpf-remove-= the-cgroup-bpf-header-dependecy/20211216-021426 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git ma= ster config: nds32-defconfig (https://download.01.org/0day-ci/archive/20211216/2= 02112160742.WbIAtZxD-lkp(a)intel.com/config) compiler: nds32le-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 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/0day-ci/linux/commit/4dc3a2bcf4720df1766ff9dc2= bcbf14b3f221a31 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jakub-Kicinski/bpf-remove-the-cgro= up-bpf-header-dependecy/20211216-021426 git checkout 4dc3a2bcf4720df1766ff9dc2bcbf14b3f221a31 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dnds32 SHELL=3D/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from include/linux/trace_events.h:10, from include/trace/syscall.h:7, from include/linux/syscalls.h:88, from kernel/events/core.c:34: include/linux/perf_event.h:1239:41: warning: 'struct bpf_prog' declared = inside parameter list will not be visible outside of this definition or dec= laration 1239 | extern void perf_event_bpf_event(struct bpf_prog *prog, | ^~~~~~~~ >> kernel/events/core.c:8935:6: error: conflicting types for 'perf_event_bp= f_event'; have 'void(struct bpf_prog *, enum perf_bpf_event_type, u16)' {a= ka 'void(struct bpf_prog *, enum perf_bpf_event_type, short unsigned int)'} 8935 | void perf_event_bpf_event(struct bpf_prog *prog, | ^~~~~~~~~~~~~~~~~~~~ In file included from include/linux/trace_events.h:10, from include/trace/syscall.h:7, from include/linux/syscalls.h:88, from kernel/events/core.c:34: include/linux/perf_event.h:1239:13: note: previous declaration of 'perf_= event_bpf_event' with type 'void(struct bpf_prog *, enum perf_bpf_event_typ= e, u16)' {aka 'void(struct bpf_prog *, enum perf_bpf_event_type, short un= signed int)'} 1239 | extern void perf_event_bpf_event(struct bpf_prog *prog, | ^~~~~~~~~~~~~~~~~~~~ vim +8935 kernel/events/core.c 6ee52e2a3fe4ea Song Liu 2019-01-17 8934 = 6ee52e2a3fe4ea Song Liu 2019-01-17 @8935 void perf_event_bpf_event(struct = bpf_prog *prog, 6ee52e2a3fe4ea Song Liu 2019-01-17 8936 enum perf_bpf_event_type typ= e, 6ee52e2a3fe4ea Song Liu 2019-01-17 8937 u16 flags) 6ee52e2a3fe4ea Song Liu 2019-01-17 8938 { 6ee52e2a3fe4ea Song Liu 2019-01-17 8939 struct perf_bpf_event bpf_event; 6ee52e2a3fe4ea Song Liu 2019-01-17 8940 = 6ee52e2a3fe4ea Song Liu 2019-01-17 8941 if (type <=3D PERF_BPF_EVENT_UNK= NOWN || 6ee52e2a3fe4ea Song Liu 2019-01-17 8942 type >=3D PERF_BPF_EVENT_MAX) 6ee52e2a3fe4ea Song Liu 2019-01-17 8943 return; 6ee52e2a3fe4ea Song Liu 2019-01-17 8944 = 6ee52e2a3fe4ea Song Liu 2019-01-17 8945 switch (type) { 6ee52e2a3fe4ea Song Liu 2019-01-17 8946 case PERF_BPF_EVENT_PROG_LOAD: 6ee52e2a3fe4ea Song Liu 2019-01-17 8947 case PERF_BPF_EVENT_PROG_UNLOAD: 6ee52e2a3fe4ea Song Liu 2019-01-17 8948 if (atomic_read(&nr_ksymbol_eve= nts)) 6ee52e2a3fe4ea Song Liu 2019-01-17 8949 perf_event_bpf_emit_ksymbols(p= rog, type); 6ee52e2a3fe4ea Song Liu 2019-01-17 8950 break; 6ee52e2a3fe4ea Song Liu 2019-01-17 8951 default: 6ee52e2a3fe4ea Song Liu 2019-01-17 8952 break; 6ee52e2a3fe4ea Song Liu 2019-01-17 8953 } 6ee52e2a3fe4ea Song Liu 2019-01-17 8954 = 6ee52e2a3fe4ea Song Liu 2019-01-17 8955 if (!atomic_read(&nr_bpf_events)) 6ee52e2a3fe4ea Song Liu 2019-01-17 8956 return; 6ee52e2a3fe4ea Song Liu 2019-01-17 8957 = 6ee52e2a3fe4ea Song Liu 2019-01-17 8958 bpf_event =3D (struct perf_bpf_e= vent){ 6ee52e2a3fe4ea Song Liu 2019-01-17 8959 .prog =3D prog, 6ee52e2a3fe4ea Song Liu 2019-01-17 8960 .event_id =3D { 6ee52e2a3fe4ea Song Liu 2019-01-17 8961 .header =3D { 6ee52e2a3fe4ea Song Liu 2019-01-17 8962 .type =3D PERF_RECORD_BPF_EVE= NT, 6ee52e2a3fe4ea Song Liu 2019-01-17 8963 .size =3D sizeof(bpf_event.ev= ent_id), 6ee52e2a3fe4ea Song Liu 2019-01-17 8964 }, 6ee52e2a3fe4ea Song Liu 2019-01-17 8965 .type =3D type, 6ee52e2a3fe4ea Song Liu 2019-01-17 8966 .flags =3D flags, 6ee52e2a3fe4ea Song Liu 2019-01-17 8967 .id =3D prog->aux->id, 6ee52e2a3fe4ea Song Liu 2019-01-17 8968 }, 6ee52e2a3fe4ea Song Liu 2019-01-17 8969 }; 6ee52e2a3fe4ea Song Liu 2019-01-17 8970 = 6ee52e2a3fe4ea Song Liu 2019-01-17 8971 BUILD_BUG_ON(BPF_TAG_SIZE % size= of(u64)); 6ee52e2a3fe4ea Song Liu 2019-01-17 8972 = 6ee52e2a3fe4ea Song Liu 2019-01-17 8973 memcpy(bpf_event.event_id.tag, p= rog->tag, BPF_TAG_SIZE); 6ee52e2a3fe4ea Song Liu 2019-01-17 8974 perf_iterate_sb(perf_event_bpf_o= utput, &bpf_event, NULL); 6ee52e2a3fe4ea Song Liu 2019-01-17 8975 } 6ee52e2a3fe4ea Song Liu 2019-01-17 8976 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============3549516732366145948==--