Re: [PATCH v8 bpf-next 07/13] bpf: Add btf_struct_ids_match function

2020-07-29 Thread Jiri Olsa
On Wed, Jul 29, 2020 at 10:51:26AM -0700, Andrii Nakryiko wrote: > On Wed, Jul 29, 2020 at 9:04 AM Jiri Olsa wrote: > > > > On Tue, Jul 28, 2020 at 04:35:16PM -0700, Andrii Nakryiko wrote: > > > > SNIP > > > > > > diff --git a/include/linux/bpf.h b/include/linux/bpf.h > > > > index bae557ff2da8..c

Re: [PATCH v8 bpf-next 07/13] bpf: Add btf_struct_ids_match function

2020-07-29 Thread Andrii Nakryiko
On Wed, Jul 29, 2020 at 9:04 AM Jiri Olsa wrote: > > On Tue, Jul 28, 2020 at 04:35:16PM -0700, Andrii Nakryiko wrote: > > SNIP > > > > diff --git a/include/linux/bpf.h b/include/linux/bpf.h > > > index bae557ff2da8..c981e258fed3 100644 > > > --- a/include/linux/bpf.h > > > +++ b/include/linux/bpf.

Re: [PATCH v8 bpf-next 07/13] bpf: Add btf_struct_ids_match function

2020-07-29 Thread Jiri Olsa
On Tue, Jul 28, 2020 at 04:35:16PM -0700, Andrii Nakryiko wrote: SNIP > > diff --git a/include/linux/bpf.h b/include/linux/bpf.h > > index bae557ff2da8..c981e258fed3 100644 > > --- a/include/linux/bpf.h > > +++ b/include/linux/bpf.h > > @@ -1306,6 +1306,8 @@ int btf_struct_access(struct bpf_verif

Re: [PATCH v8 bpf-next 07/13] bpf: Add btf_struct_ids_match function

2020-07-28 Thread Andrii Nakryiko
On Wed, Jul 22, 2020 at 2:13 PM Jiri Olsa wrote: > > Adding btf_struct_ids_match function to check if given address provided > by BTF object + offset is also address of another nested BTF object. > > This allows to pass an argument to helper, which is defined via parent > BTF object + offset, like

[PATCH v8 bpf-next 07/13] bpf: Add btf_struct_ids_match function

2020-07-22 Thread Jiri Olsa
Adding btf_struct_ids_match function to check if given address provided by BTF object + offset is also address of another nested BTF object. This allows to pass an argument to helper, which is defined via parent BTF object + offset, like for bpf_d_path (added in following changes): SEC("fentry/