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

2020-08-09 Thread Jiri Olsa
On Fri, Aug 07, 2020 at 01:04:26PM -0700, Andrii Nakryiko wrote: SNIP > > + } > > } > > } else if (!fn->check_btf_id(reg->btf_id, arg)) { > > Put this on a wishlist for now. I don't think we should expect > fb->check_btf_id()

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

2020-08-07 Thread Andrii Nakryiko
On Fri, Aug 7, 2020 at 2:47 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 v10 bpf-next 08/14] bpf: Add btf_struct_ids_match function

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