Re: [PATCH bpf-next v1 4/8] bpf/libbpf: BTF support for typed ksyms

2020-09-01 Thread Hao Luo
On Tue, Sep 1, 2020 at 4:55 PM Andrii Nakryiko wrote: > > On Tue, Sep 1, 2020 at 1:35 PM Hao Luo wrote: > > > > On Tue, Sep 1, 2020 at 11:11 AM Andrii Nakryiko > > wrote: > > > > > > On Thu, Aug 27, 2020 at 3:29 PM Hao Luo wrote: > > > > > > > > On Fri, Aug 21, 2020 at 3:37 PM Andrii Nakryiko

Re: [PATCH bpf-next v1 4/8] bpf/libbpf: BTF support for typed ksyms

2020-09-01 Thread Andrii Nakryiko
On Tue, Sep 1, 2020 at 1:35 PM Hao Luo wrote: > > On Tue, Sep 1, 2020 at 11:11 AM Andrii Nakryiko > wrote: > > > > On Thu, Aug 27, 2020 at 3:29 PM Hao Luo wrote: > > > > > > On Fri, Aug 21, 2020 at 3:37 PM Andrii Nakryiko > > > wrote: > > > > > > > > On Wed, Aug 19, 2020 at 3:42 PM Hao Luo

Re: [PATCH bpf-next v1 4/8] bpf/libbpf: BTF support for typed ksyms

2020-09-01 Thread Hao Luo
On Tue, Sep 1, 2020 at 11:11 AM Andrii Nakryiko wrote: > > On Thu, Aug 27, 2020 at 3:29 PM Hao Luo wrote: > > > > On Fri, Aug 21, 2020 at 3:37 PM Andrii Nakryiko > > wrote: > > > > > > On Wed, Aug 19, 2020 at 3:42 PM Hao Luo wrote: > > > > > > > > If a ksym is defined with a type, libbpf will

Re: [PATCH bpf-next v1 4/8] bpf/libbpf: BTF support for typed ksyms

2020-09-01 Thread Andrii Nakryiko
On Thu, Aug 27, 2020 at 3:29 PM Hao Luo wrote: > > On Fri, Aug 21, 2020 at 3:37 PM Andrii Nakryiko > wrote: > > > > On Wed, Aug 19, 2020 at 3:42 PM Hao Luo wrote: > > > > > > If a ksym is defined with a type, libbpf will try to find the ksym's btf > > > information from kernel btf. If a valid

Re: [PATCH bpf-next v1 4/8] bpf/libbpf: BTF support for typed ksyms

2020-08-27 Thread Hao Luo
On Fri, Aug 21, 2020 at 3:37 PM Andrii Nakryiko wrote: > > On Wed, Aug 19, 2020 at 3:42 PM Hao Luo wrote: > > > > If a ksym is defined with a type, libbpf will try to find the ksym's btf > > information from kernel btf. If a valid btf entry for the ksym is found, > > libbpf can pass in the found

Re: [PATCH bpf-next v1 4/8] bpf/libbpf: BTF support for typed ksyms

2020-08-21 Thread Andrii Nakryiko
On Wed, Aug 19, 2020 at 3:42 PM Hao Luo wrote: > > If a ksym is defined with a type, libbpf will try to find the ksym's btf > information from kernel btf. If a valid btf entry for the ksym is found, > libbpf can pass in the found btf id to the verifier, which validates the > ksym's type and

[PATCH bpf-next v1 4/8] bpf/libbpf: BTF support for typed ksyms

2020-08-19 Thread Hao Luo
If a ksym is defined with a type, libbpf will try to find the ksym's btf information from kernel btf. If a valid btf entry for the ksym is found, libbpf can pass in the found btf id to the verifier, which validates the ksym's type and value. Typeless ksyms (i.e. those defined as 'void') will not