Re: [PATCH bpf 2/2] libbpf: allow loading empty BTFs

2021-01-12 Thread Daniel Borkmann
On 1/12/21 7:41 AM, Andrii Nakryiko wrote: On Mon, Jan 11, 2021 at 5:16 PM Yonghong Song wrote: On 1/11/21 12:51 PM, Andrii Nakryiko wrote: On Mon, Jan 11, 2021 at 10:13 AM Yonghong Song wrote: On 1/9/21 11:03 PM, Andrii Nakryiko wrote: Empty BTFs do come up (e.g., simple kernel modules wit

Re: [PATCH bpf 2/2] libbpf: allow loading empty BTFs

2021-01-12 Thread Andrii Nakryiko
On Tue, Jan 12, 2021 at 12:17 PM Daniel Borkmann wrote: > > On 1/12/21 7:41 AM, Andrii Nakryiko wrote: > > On Mon, Jan 11, 2021 at 5:16 PM Yonghong Song wrote: > >> On 1/11/21 12:51 PM, Andrii Nakryiko wrote: > >>> On Mon, Jan 11, 2021 at 10:13 AM Yonghong Song wrote: > On 1/9/21 11:03 PM,

Re: [PATCH bpf 2/2] libbpf: allow loading empty BTFs

2021-01-11 Thread Andrii Nakryiko
On Mon, Jan 11, 2021 at 5:16 PM Yonghong Song wrote: > > > > On 1/11/21 12:51 PM, Andrii Nakryiko wrote: > > On Mon, Jan 11, 2021 at 10:13 AM Yonghong Song wrote: > >> > >> > >> > >> On 1/9/21 11:03 PM, Andrii Nakryiko wrote: > >>> Empty BTFs do come up (e.g., simple kernel modules with no new ty

Re: [PATCH bpf 2/2] libbpf: allow loading empty BTFs

2021-01-11 Thread Yonghong Song
On 1/11/21 12:51 PM, Andrii Nakryiko wrote: On Mon, Jan 11, 2021 at 10:13 AM Yonghong Song wrote: On 1/9/21 11:03 PM, Andrii Nakryiko wrote: Empty BTFs do come up (e.g., simple kernel modules with no new types and strings, compared to the vmlinux BTF) and there is nothing technically wro

Re: [PATCH bpf 2/2] libbpf: allow loading empty BTFs

2021-01-11 Thread Andrii Nakryiko
On Mon, Jan 11, 2021 at 10:13 AM Yonghong Song wrote: > > > > On 1/9/21 11:03 PM, Andrii Nakryiko wrote: > > Empty BTFs do come up (e.g., simple kernel modules with no new types and > > strings, compared to the vmlinux BTF) and there is nothing technically wrong > > with them. So remove unnecessar

Re: [PATCH bpf 2/2] libbpf: allow loading empty BTFs

2021-01-11 Thread Yonghong Song
On 1/9/21 11:03 PM, Andrii Nakryiko wrote: Empty BTFs do come up (e.g., simple kernel modules with no new types and strings, compared to the vmlinux BTF) and there is nothing technically wrong with them. So remove unnecessary check preventing loading empty BTFs. Reported-by: Christopher Willi

[PATCH bpf 2/2] libbpf: allow loading empty BTFs

2021-01-09 Thread Andrii Nakryiko
Empty BTFs do come up (e.g., simple kernel modules with no new types and strings, compared to the vmlinux BTF) and there is nothing technically wrong with them. So remove unnecessary check preventing loading empty BTFs. Reported-by: Christopher William Snowhill Fixes: ("d8123624506c libbpf: Fix B