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-cg...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: nds32-defconfig
(
https://download.01.org/0day-ci/archive/20211216/202112160742.WbIAtZxD-lk...)
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://github.com/0day-ci/linux/commit/4dc3a2bcf4720df1766ff9dc2bcbf14b3...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Jakub-Kicinski/bpf-remove-the-cgroup-bpf-header-dependecy/20211216-021426
git checkout 4dc3a2bcf4720df1766ff9dc2bcbf14b3f221a31
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir
ARCH=nds32 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
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 declaration
1239 | extern void perf_event_bpf_event(struct bpf_prog *prog,
| ^~~~~~~~
> kernel/events/core.c:8935:6: error: conflicting types for
'perf_event_bpf_event'; have 'void(struct bpf_prog *, enum
perf_bpf_event_type, u16)' {aka '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_type, u16)' {aka 'void(struct bpf_prog *, enum
perf_bpf_event_type, short unsigned 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 type,
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 <= PERF_BPF_EVENT_UNKNOWN ||
6ee52e2a3fe4ea Song Liu 2019-01-17 8942 type >= 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_events))
6ee52e2a3fe4ea Song Liu 2019-01-17 8949 perf_event_bpf_emit_ksymbols(prog, 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 = (struct perf_bpf_event){
6ee52e2a3fe4ea Song Liu 2019-01-17 8959 .prog = prog,
6ee52e2a3fe4ea Song Liu 2019-01-17 8960 .event_id = {
6ee52e2a3fe4ea Song Liu 2019-01-17 8961 .header = {
6ee52e2a3fe4ea Song Liu 2019-01-17 8962 .type = PERF_RECORD_BPF_EVENT,
6ee52e2a3fe4ea Song Liu 2019-01-17 8963 .size = sizeof(bpf_event.event_id),
6ee52e2a3fe4ea Song Liu 2019-01-17 8964 },
6ee52e2a3fe4ea Song Liu 2019-01-17 8965 .type = type,
6ee52e2a3fe4ea Song Liu 2019-01-17 8966 .flags = flags,
6ee52e2a3fe4ea Song Liu 2019-01-17 8967 .id = 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 % sizeof(u64));
6ee52e2a3fe4ea Song Liu 2019-01-17 8972
6ee52e2a3fe4ea Song Liu 2019-01-17 8973 memcpy(bpf_event.event_id.tag, prog->tag,
BPF_TAG_SIZE);
6ee52e2a3fe4ea Song Liu 2019-01-17 8974 perf_iterate_sb(perf_event_bpf_output,
&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@lists.01.org