Thread (5 messages) 5 messages, 3 authors, 2020-08-01

Re: pull-request: bpf 2020-07-31

From: Jiri Olsa <hidden>
Date: 2020-07-31 18:08:14
Also in: bpf

On Fri, Jul 31, 2020 at 06:12:48PM +0200, Daniel Borkmann wrote:

SNIP
quoted
quoted
                 return -EINVAL;
         return id;
}

Let me know if you run into any others issues (CC'ing Jiri Olsa so he's in
the loop with regards to merge conflict resolution).
we'll loose the bpf_log message, but I'm fine with that ;-) looks good
Checking again on the fix, even though it was only triggered by syzkaller
so far, I think it's also possible if users don't have BTF debug data set
in the Kconfig but use a helper that expects it, so agree, lets re-add the
log in this case:

int btf_resolve_helper_id(struct bpf_verifier_log *log,
                          const struct bpf_func_proto *fn, int arg)
{
        int id;

        if (fn->arg_type[arg] != ARG_PTR_TO_BTF_ID)
                return -EINVAL;
        if (!btf_vmlinux) {
                bpf_log(log, "btf_vmlinux doesn't exist\n");
                return -EINVAL;
        }
        id = fn->btf_id[arg];
        if (!id || id > btf_vmlinux->nr_types)
                return -EINVAL;
        return id;
}
ok, looks good
jirka
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help