Re: [PATCH v9 bpf-next 08/14] bpf: Add btf_struct_ids_match function

2020-08-05 Thread Andrii Nakryiko
On Wed, Aug 5, 2020 at 2:31 PM Jiri Olsa wrote: > > On Wed, Aug 05, 2020 at 07:56:51PM +0200, Jiri Olsa wrote: > > On Tue, Aug 04, 2020 at 11:27:55PM -0700, Andrii Nakryiko wrote: > > > > SNIP > > > > > > diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c > > > > index 7bacc2f56061..ba05b15ad599 100

Re: [PATCH v9 bpf-next 08/14] bpf: Add btf_struct_ids_match function

2020-08-05 Thread Jiri Olsa
On Wed, Aug 05, 2020 at 07:56:51PM +0200, Jiri Olsa wrote: > On Tue, Aug 04, 2020 at 11:27:55PM -0700, Andrii Nakryiko wrote: > > SNIP > > > > diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c > > > index 7bacc2f56061..ba05b15ad599 100644 > > > --- a/kernel/bpf/btf.c > > > +++ b/kernel/bpf/btf.c >

Re: [PATCH v9 bpf-next 08/14] bpf: Add btf_struct_ids_match function

2020-08-05 Thread Jiri Olsa
On Tue, Aug 04, 2020 at 11:27:55PM -0700, Andrii Nakryiko wrote: SNIP > > diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c > > index 7bacc2f56061..ba05b15ad599 100644 > > --- a/kernel/bpf/btf.c > > +++ b/kernel/bpf/btf.c > > @@ -4160,6 +4160,37 @@ int btf_struct_access(struct bpf_verifier_log *lo

Re: [PATCH v9 bpf-next 08/14] bpf: Add btf_struct_ids_match function

2020-08-04 Thread Andrii Nakryiko
On Sat, Aug 1, 2020 at 10:04 AM 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 v9 bpf-next 08/14] bpf: Add btf_struct_ids_match function

2020-08-01 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/