Re: [PATCH v2 bpf] libbpf: detect supported kernel BTF features and sanitize BTF

2019-05-10 Thread Andrii Nakryiko
On Fri, May 10, 2019 at 1:13 PM Alexei Starovoitov wrote: > > On Fri, May 10, 2019 at 11:41:50AM -0700, Andrii Nakryiko wrote: > > Depending on used versions of libbpf, Clang, and kernel, it's possible to > > have valid BPF object files with valid BTF information, that still won't > > load success

Re: [PATCH v2 bpf] libbpf: detect supported kernel BTF features and sanitize BTF

2019-05-10 Thread Alexei Starovoitov
On Fri, May 10, 2019 at 11:41:50AM -0700, Andrii Nakryiko wrote: > Depending on used versions of libbpf, Clang, and kernel, it's possible to > have valid BPF object files with valid BTF information, that still won't > load successfully due to Clang emitting newer BTF features (e.g., > BTF_KIND_FUNC

[PATCH v2 bpf] libbpf: detect supported kernel BTF features and sanitize BTF

2019-05-10 Thread Andrii Nakryiko
Depending on used versions of libbpf, Clang, and kernel, it's possible to have valid BPF object files with valid BTF information, that still won't load successfully due to Clang emitting newer BTF features (e.g., BTF_KIND_FUNC, .BTF.ext's line_info/func_info, BTF_KIND_DATASEC, etc), that are not ye