On Mon, Aug 3, 2020 at 10:56 AM Daniel Borkmann <daniel@xxxxxxxxxxxxx> wrote: > > On 8/3/20 7:51 PM, Andrii Nakryiko wrote: > > On Mon, Aug 3, 2020 at 10:41 AM Daniel Borkmann <daniel@xxxxxxxxxxxxx> wrote: > >> On 8/3/20 7:34 PM, Daniel Borkmann wrote: > >>> On 8/3/20 7:15 PM, Daniel Borkmann wrote: > >>>> On 8/3/20 12:29 AM, Alexei Starovoitov wrote: > >>>>> From: Alexei Starovoitov <ast@xxxxxxxxxx> > >>>>> > >>>>> Add kernel module with user mode driver that populates bpffs with > >>>>> BPF iterators. > >>>>> > > > > [...] > > > >> CC kernel/events/ring_buffer.o > >> CC [U] kernel/bpf/preload/./../../../tools/lib/bpf/bpf.o > >> CC [U] kernel/bpf/preload/./../../../tools/lib/bpf/libbpf.o > >> In file included from kernel/bpf/preload/./../../../tools/lib/bpf/libbpf.c:47:0: > >> ./tools/include/tools/libc_compat.h:11:21: error: static declaration of ‘reallocarray’ follows non-static declaration > >> static inline void *reallocarray(void *ptr, size_t nmemb, size_t size) > >> ^~~~~~~~~~~~ > >> In file included from kernel/bpf/preload/./../../../tools/lib/bpf/libbpf.c:16:0: > >> /usr/include/stdlib.h:558:14: note: previous declaration of ‘reallocarray’ was here > >> extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) > >> ^~~~~~~~~~~~ > > > > A bit offtopic. reallocarray and related feature detection causes so > > much hassle, that I'm strongly tempted to just get rid of it in the > > entire libbpf. Or just unconditionally implement libbpf-specific > > reallocarray function. Any objections? > > Agree that it's continuously causing pain; no objection from my side to have > something libbpf-specifc for example (along with a comment on /why/ we're not > reusing it anymore). Sounds good! > > >> CC kernel/user-return-notifier.o > >> scripts/Makefile.userprogs:43: recipe for target 'kernel/bpf/preload/./../../../tools/lib/bpf/libbpf.o' failed > >> make[3]: *** [kernel/bpf/preload/./../../../tools/lib/bpf/libbpf.o] Error 1 > >> scripts/Makefile.build:497: recipe for target 'kernel/bpf/preload' failed > >> make[2]: *** [kernel/bpf/preload] Error 2 > >> scripts/Makefile.build:497: recipe for target 'kernel/bpf' failed > >> make[1]: *** [kernel/bpf] Error 2 > >> make[1]: *** Waiting for unfinished jobs.... > >> [...]