* Re: [bpf:master 3/3] kernel/bpf/arraymap.c:657:36: error: invalid application of 'sizeof' to incomplete type 'struct perf_sample_data'
[not found] <201906011337.lBp5SlWB%lkp@intel.com>
@ 2019-06-01 15:42 ` Alexei Starovoitov
0 siblings, 0 replies; only message in thread
From: Alexei Starovoitov @ 2019-06-01 15:42 UTC (permalink / raw)
To: Daniel Borkmann, bpf, Network Development
Cc: Matt Mullins, kbuild-all, Andrew Hall
Hi Matt,
due to this build issue I removed your commit from bpf tree.
Please fix and resubmit.
Thanks!
On Fri, May 31, 2019 at 10:48 PM kbuild test robot <lkp@intel.com> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git master
> head: 0b21b5502f561940e0d29f7ec5f840309e4a0243
> commit: 0b21b5502f561940e0d29f7ec5f840309e4a0243 [3/3] bpf: preallocate a perf_sample_data per event fd
> config: m68k-allyesconfig (attached as .config)
> compiler: m68k-linux-gcc (GCC) 7.4.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout 0b21b5502f561940e0d29f7ec5f840309e4a0243
> # save the attached .config to linux build tree
> GCC_VERSION=7.4.0 make.cross ARCH=m68k
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> kernel/bpf/arraymap.c: In function 'bpf_event_entry_gen':
> >> kernel/bpf/arraymap.c:657:36: error: invalid application of 'sizeof' to incomplete type 'struct perf_sample_data'
> ee = kzalloc(sizeof(*ee) + sizeof(struct perf_sample_data), GFP_ATOMIC);
> ^~~~~~
>
> vim +657 kernel/bpf/arraymap.c
>
> 651
> 652 static struct bpf_event_entry *bpf_event_entry_gen(struct file *perf_file,
> 653 struct file *map_file)
> 654 {
> 655 struct bpf_event_entry *ee;
> 656
> > 657 ee = kzalloc(sizeof(*ee) + sizeof(struct perf_sample_data), GFP_ATOMIC);
> 658 if (ee) {
> 659 ee->event = perf_file->private_data;
> 660 ee->perf_file = perf_file;
> 661 ee->map_file = map_file;
> 662 ee->sd = (void *)ee + sizeof(*ee);
> 663 }
> 664
> 665 return ee;
> 666 }
> 667
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply [flat|nested] only message in thread