Re: [RFC bpf-next v3 03/12] bpf: verifier: remove dead code

2018-12-31 Thread Jakub Kicinski
On Mon, 31 Dec 2018 21:41:22 +, Yonghong Song wrote: > > func2 after func adjust will start at off and there is no line info for > > off + cnt (insn4), so we will preserve line_info2. > > Thanks for verification, I missed that > >>> +/* count lines to be removed */ > >>> +l

Re: [RFC bpf-next v3 03/12] bpf: verifier: remove dead code

2018-12-31 Thread Yonghong Song
On 12/31/18 12:31 PM, Jakub Kicinski wrote: > On Sun, 30 Dec 2018 22:02:10 +, Yonghong Song wrote: >> On 12/28/18 7:09 PM, Jakub Kicinski wrote: >>> +static int bpf_adj_linfo_after_remove(struct bpf_verifier_env *env, u32 >>> off, >>> + u32 cnt) >>> +{ >>> +

Re: [RFC bpf-next v3 03/12] bpf: verifier: remove dead code

2018-12-31 Thread Jakub Kicinski
On Sun, 30 Dec 2018 22:02:10 +, Yonghong Song wrote: > On 12/28/18 7:09 PM, Jakub Kicinski wrote: > > +static int bpf_adj_linfo_after_remove(struct bpf_verifier_env *env, u32 > > off, > > + u32 cnt) > > +{ > > + struct bpf_subprog_info *need_first_linfo; > > +

Re: [RFC bpf-next v3 03/12] bpf: verifier: remove dead code

2018-12-30 Thread Yonghong Song
On 12/28/18 7:09 PM, Jakub Kicinski wrote: > Instead of overwriting dead code with jmp -1 instructions > remove it completely for root. Adjust verifier state and > line info appropriately. > > v2: > - adjust func_info (Alexei); > - make sure first instruction retains line info (Alexei). >

[RFC bpf-next v3 03/12] bpf: verifier: remove dead code

2018-12-28 Thread Jakub Kicinski
Instead of overwriting dead code with jmp -1 instructions remove it completely for root. Adjust verifier state and line info appropriately. v2: - adjust func_info (Alexei); - make sure first instruction retains line info (Alexei). Signed-off-by: Jakub Kicinski --- include/linux/filter.h |