Re: [PATCH bpf-next v1 3/8] bpf: Introduce help function to validate ksym's type.

2020-08-21 Thread Andrii Nakryiko
On Fri, Aug 21, 2020 at 5:43 PM Hao Luo wrote: > > On Fri, Aug 21, 2020 at 2:50 PM Andrii Nakryiko > wrote: > > > > On Thu, Aug 20, 2020 at 10:22 AM Yonghong Song wrote: > > > > > > > > > > > > On 8/19/20 3:40 PM, Hao Luo wrote: > > > > For a ksym to be safely dereferenced and accessed, its type

Re: [PATCH bpf-next v1 3/8] bpf: Introduce help function to validate ksym's type.

2020-08-21 Thread Andrii Nakryiko
On Thu, Aug 20, 2020 at 10:22 AM Yonghong Song wrote: > > > > On 8/19/20 3:40 PM, Hao Luo wrote: > > For a ksym to be safely dereferenced and accessed, its type defined in > > bpf program should basically match its type defined in kernel. Implement > > a help function for a quick matching, which i

Re: [PATCH bpf-next v1 3/8] bpf: Introduce help function to validate ksym's type.

2020-08-20 Thread Yonghong Song
On 8/19/20 3:40 PM, Hao Luo wrote: For a ksym to be safely dereferenced and accessed, its type defined in bpf program should basically match its type defined in kernel. Implement a help function for a quick matching, which is used by libbpf when resolving the kernel btf_id of a ksym. Signed-o