Re: [PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-04-05 Thread Alexei Starovoitov
On Thu, Apr 05, 2018 at 04:50:03PM +0100, Jiong Wang wrote: > On 03/04/2018 02:08, Alexei Starovoitov wrote: > > Combining subprog pass with do_check is going into opposite direction > > of this long term work. Divide and conquer. Combining more things into > > do_check is the opposite of this prog

Re: [PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-04-05 Thread Edward Cree
On 05/04/18 16:50, Jiong Wang wrote: > On 03/04/2018 02:08, Alexei Starovoitov wrote: >> Combining subprog pass with do_check is going into opposite direction >> of this long term work. Divide and conquer. Combining more things into >> do_check is the opposite of this programming principle. > > Agr

Re: [PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-04-05 Thread Jiong Wang
On 03/04/2018 02:08, Alexei Starovoitov wrote: Combining subprog pass with do_check is going into opposite direction of this long term work. Divide and conquer. Combining more things into do_check is the opposite of this programming principle. Agree. And for the redundant insn traversal issue i

Re: [PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-04-05 Thread Edward Cree
On 05/04/18 06:28, Alexei Starovoitov wrote: > On Thu, Apr 05, 2018 at 12:58:46AM +0100, Edward Cree wrote: >> On 04/04/18 00:37, Alexei Starovoitov wrote: >>> hmm. that doesn't fail for me and any other bots didn't complain. >>> Are you sure you're running the latest kernel and tests? >> Ah, test_

Re: [PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-04-04 Thread Alexei Starovoitov
On Thu, Apr 05, 2018 at 12:58:46AM +0100, Edward Cree wrote: > On 04/04/18 00:37, Alexei Starovoitov wrote: > > hmm. that doesn't fail for me and any other bots didn't complain. > > Are you sure you're running the latest kernel and tests? > Ah, test_progs isn't actually rebuilding because __NR_bpf

Re: [PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-04-04 Thread Edward Cree
On 04/04/18 00:37, Alexei Starovoitov wrote: > hmm. that doesn't fail for me and any other bots didn't complain. > Are you sure you're running the latest kernel and tests? Ah, test_progs isn't actually rebuilding because __NR_bpf is undeclared;  something must be going wrong with header files. Neve

Re: [PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-04-03 Thread Alexei Starovoitov
On Tue, Apr 03, 2018 at 02:39:11PM +0100, Edward Cree wrote: > On 03/04/18 02:08, Alexei Starovoitov wrote: > > I like patch 3 and going to play with it. > > How did you test it ? > Just test_verifier and test_progs (the latter has a failure >  "test_bpf_obj_id:FAIL:get-prog-info(fd) err 0 errno 2

Re: [PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-04-03 Thread Edward Cree
On 03/04/18 02:08, Alexei Starovoitov wrote: > I like patch 3 and going to play with it. > How did you test it ? Just test_verifier and test_progs (the latter has a failure  "test_bpf_obj_id:FAIL:get-prog-info(fd) err 0 errno 2 i 0 type 1(1) info_len 80(40) jit_enabled 0 jited_prog_len 0 xlated_pr

Re: [PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-04-02 Thread Alexei Starovoitov
On Thu, Mar 29, 2018 at 11:44:17PM +0100, Edward Cree wrote: > By storing subprog boundaries as a subprogno mark on each insn, rather than > a start (and implicit end) for each subprog, we collect a number of gains: > * More efficient determination of which subprog contains a given insn, and > t

Re: [PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-03-29 Thread Edward Cree
On 29/03/18 23:44, Edward Cree wrote: > By storing subprog boundaries as a subprogno mark on each insn, rather than > a start (and implicit end) for each subprog, we collect a number of gains: > * More efficient determination of which subprog contains a given insn, and > thus of find_subprog (wh

[PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-03-29 Thread Edward Cree
By storing subprog boundaries as a subprogno mark on each insn, rather than a start (and implicit end) for each subprog, we collect a number of gains: * More efficient determination of which subprog contains a given insn, and thus of find_subprog (which subprog begins at a given insn). * Number