Re: [PATCH v2 bpf-next 1/4] bpftool: generate NULL definition in vmlinux.h

2021-03-17 Thread Alexei Starovoitov
On Wed, Mar 17, 2021 at 10:38 AM Andrii Nakryiko wrote: > > diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c > > index 62953bbf68b4..ff6a76632873 100644 > > --- a/tools/bpf/bpftool/btf.c > > +++ b/tools/bpf/bpftool/btf.c > > @@ -405,6 +405,8 @@ static int dump_btf_c(const struct btf

Re: [PATCH v2 bpf-next 1/4] bpftool: generate NULL definition in vmlinux.h

2021-03-17 Thread Andrii Nakryiko
On Tue, Mar 16, 2021 at 8:13 PM Andrii Nakryiko wrote: > > Given that vmlinux.h is not compatible with headers like stdint.h, NULL poses > an annoying problem: it is defined as #define, so is not captured in BTF, so > is not emitted into vmlinux.h. This leads to users either sticking to explicit >