On Sun, Jun 28, 2020 at 01:59:54PM -0700, Yonghong Song wrote:
SNIP
> > >
> > > The corresponding BTF_ID definition here is:
> > >BTF_ID_LIST(bpf_skb_output_btf_ids)
> > >BTF_ID(struct, sk_buff)
> > >
> > > The bpf helper writer needs to ensure proper declarations
> > > of BTF_IDs like
On 6/28/20 1:16 PM, Jiri Olsa wrote:
On Fri, Jun 26, 2020 at 02:36:37PM -0700, Yonghong Song wrote:
SNIP
- }
-
- t = btf_type_by_id(btf_vmlinux, t->type);
- if (!btf_type_is_ptr(t))
- return -EFAULT;
- t = btf_type_by_id(btf_vmlinux, t->type);
- i
On Fri, Jun 26, 2020 at 02:36:37PM -0700, Yonghong Song wrote:
SNIP
> > - }
> > -
> > - t = btf_type_by_id(btf_vmlinux, t->type);
> > - if (!btf_type_is_ptr(t))
> > - return -EFAULT;
> > - t = btf_type_by_id(btf_vmlinux, t->type);
> > - if (!btf_type_is_func_proto(t))
> > -
On Sun, Jun 28, 2020 at 11:50 AM Alexei Starovoitov
wrote:
>
> On Fri, Jun 26, 2020 at 04:29:23PM -0700, Yonghong Song wrote:
> > > > >
> > > > > -int btf_resolve_helper_id(struct bpf_verifier_log *log,
> > > > > - const struct bpf_func_proto *fn, int arg)
> > > > > -{
> > >
On Fri, Jun 26, 2020 at 04:29:23PM -0700, Yonghong Song wrote:
> > > >
> > > > -int btf_resolve_helper_id(struct bpf_verifier_log *log,
> > > > - const struct bpf_func_proto *fn, int arg)
> > > > -{
> > > > - int *btf_id = &fn->btf_id[arg];
> > > > - int ret;
> > > >
On 6/26/20 2:40 PM, Andrii Nakryiko wrote:
On Fri, Jun 26, 2020 at 2:37 PM Yonghong Song wrote:
On 6/25/20 3:12 PM, Jiri Olsa wrote:
Now when we moved the helpers btf_id arrays into .BTF_ids section,
we can remove the code that resolve those IDs in runtime.
Signed-off-by: Jiri Olsa
---
On Fri, Jun 26, 2020 at 2:37 PM Yonghong Song wrote:
>
>
>
> On 6/25/20 3:12 PM, Jiri Olsa wrote:
> > Now when we moved the helpers btf_id arrays into .BTF_ids section,
> > we can remove the code that resolve those IDs in runtime.
> >
> > Signed-off-by: Jiri Olsa
> > ---
> > kernel/bpf/btf.c |
On 6/25/20 3:12 PM, Jiri Olsa wrote:
Now when we moved the helpers btf_id arrays into .BTF_ids section,
we can remove the code that resolve those IDs in runtime.
Signed-off-by: Jiri Olsa
---
kernel/bpf/btf.c | 90 +---
1 file changed, 8 insertio
Now when we moved the helpers btf_id arrays into .BTF_ids section,
we can remove the code that resolve those IDs in runtime.
Signed-off-by: Jiri Olsa
---
kernel/bpf/btf.c | 90 +---
1 file changed, 8 insertions(+), 82 deletions(-)
diff --git a/kernel/