Re: [RFC PATCH v3 bpf-next 2/5] bpf/verifier: rewrite subprog boundary detection

2018-05-01 Thread Edward Cree
On 18/04/18 00:48, Alexei Starovoitov wrote: > as I was saying before this is no go. > subprogno is meaningless in the hierarchy of: prog -> func -> bb -> insn > Soon bpf will have libraries and this field would need to become > a pointer back to bb or func structure creating unnecessary circular

Re: [RFC PATCH v3 bpf-next 2/5] bpf/verifier: rewrite subprog boundary detection

2018-04-17 Thread Alexei Starovoitov
On Fri, Apr 06, 2018 at 06:13:59PM +0100, Edward Cree wrote: > By storing a subprogno in each insn's aux data, we avoid the need to keep > the list of subprog starts sorted or bsearch() it in find_subprog(). > Also, get rid of the weird one-based indexing of subprog numbers. > > Signed-off-by: Ed

[RFC PATCH v3 bpf-next 2/5] bpf/verifier: rewrite subprog boundary detection

2018-04-06 Thread Edward Cree
By storing a subprogno in each insn's aux data, we avoid the need to keep the list of subprog starts sorted or bsearch() it in find_subprog(). Also, get rid of the weird one-based indexing of subprog numbers. Signed-off-by: Edward Cree --- include/linux/bpf_verifier.h | 3 +- kernel/bpf/verif