Thread (13 messages) flat view 13 messages, 3 authors, 2020-08-03

Re: [PATCH v5 bpf-next 3/4] bpf: Add kernel module with user mode driver that populates bpffs.

From: Daniel Borkmann <daniel@iogearbox.net>
Date: 2020-08-03 17:56:11
Also in: bpf

On 8/3/20 7:51 PM, Andrii Nakryiko wrote:
On Mon, Aug 3, 2020 at 10:41 AM Daniel Borkmann [off-list ref] wrote:
quoted
On 8/3/20 7:34 PM, Daniel Borkmann wrote:
quoted
On 8/3/20 7:15 PM, Daniel Borkmann wrote:
quoted
On 8/3/20 12:29 AM, Alexei Starovoitov wrote:
quoted
From: Alexei Starovoitov <ast@kernel.org>

Add kernel module with user mode driver that populates bpffs with
BPF iterators.
[...]
quoted
    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).
quoted
    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....
[...]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help