Re: [PATCH v2 bpf-next 05/12] libbpf: auto-detect btf_id of raw_tracepoint

2019-10-11 Thread Alexei Starovoitov
On 10/11/19 9:38 PM, Andrii Nakryiko wrote: > On Fri, Oct 11, 2019 at 6:29 PM Alexei Starovoitov wrote: >> >> On 10/11/19 5:40 PM, Alexei Starovoitov wrote: But even if kernel supports attach_btf_id, I think users still need to opt in into specifying attach_btf_id by libbpf. Think about

Re: [PATCH v2 bpf-next 05/12] libbpf: auto-detect btf_id of raw_tracepoint

2019-10-11 Thread Andrii Nakryiko
On Fri, Oct 11, 2019 at 5:40 PM Alexei Starovoitov wrote: > > On 10/11/19 11:07 AM, Andrii Nakryiko wrote: > > On Wed, Oct 9, 2019 at 9:17 PM Alexei Starovoitov wrote: > >> > >> For raw tracepoint program types libbpf will try to find > >> btf_id of raw tracepoint in vmlinux's BTF. > >> It's a re

Re: [PATCH v2 bpf-next 05/12] libbpf: auto-detect btf_id of raw_tracepoint

2019-10-11 Thread Andrii Nakryiko
On Fri, Oct 11, 2019 at 6:29 PM Alexei Starovoitov wrote: > > On 10/11/19 5:40 PM, Alexei Starovoitov wrote: > >> But even if kernel supports attach_btf_id, I think users still need to > >> opt in into specifying attach_btf_id by libbpf. Think about existing > >> raw_tp programs that are using bpf

Re: [PATCH v2 bpf-next 05/12] libbpf: auto-detect btf_id of raw_tracepoint

2019-10-11 Thread Alexei Starovoitov
On 10/11/19 5:40 PM, Alexei Starovoitov wrote: >> But even if kernel supports attach_btf_id, I think users still need to >> opt in into specifying attach_btf_id by libbpf. Think about existing >> raw_tp programs that are using bpf_probe_read() because they were not >> created with this kernel featu

Re: [PATCH v2 bpf-next 05/12] libbpf: auto-detect btf_id of raw_tracepoint

2019-10-11 Thread Alexei Starovoitov
On 10/11/19 11:07 AM, Andrii Nakryiko wrote: > On Wed, Oct 9, 2019 at 9:17 PM Alexei Starovoitov wrote: >> >> For raw tracepoint program types libbpf will try to find >> btf_id of raw tracepoint in vmlinux's BTF. >> It's a responsiblity of bpf program author to annotate the program >> with SEC("ra

Re: [PATCH v2 bpf-next 05/12] libbpf: auto-detect btf_id of raw_tracepoint

2019-10-11 Thread Andrii Nakryiko
On Wed, Oct 9, 2019 at 9:17 PM Alexei Starovoitov wrote: > > For raw tracepoint program types libbpf will try to find > btf_id of raw tracepoint in vmlinux's BTF. > It's a responsiblity of bpf program author to annotate the program > with SEC("raw_tracepoint/name") where "name" is a valid raw trac

Re: [PATCH v2 bpf-next 05/12] libbpf: auto-detect btf_id of raw_tracepoint

2019-10-11 Thread Andrii Nakryiko
On Wed, Oct 9, 2019 at 9:17 PM Alexei Starovoitov wrote: > > For raw tracepoint program types libbpf will try to find > btf_id of raw tracepoint in vmlinux's BTF. > It's a responsiblity of bpf program author to annotate the program > with SEC("raw_tracepoint/name") where "name" is a valid raw trac

[PATCH v2 bpf-next 05/12] libbpf: auto-detect btf_id of raw_tracepoint

2019-10-09 Thread Alexei Starovoitov
For raw tracepoint program types libbpf will try to find btf_id of raw tracepoint in vmlinux's BTF. It's a responsiblity of bpf program author to annotate the program with SEC("raw_tracepoint/name") where "name" is a valid raw tracepoint. If "name" is indeed a valid raw tracepoint then in-kernel BT