Re: [RFC PATCH bpf-next 0/2] bpf/verifier: simplify subprog tracking

2018-02-13 Thread Jiong Wang
On 13/02/2018 05:09, John Fastabend wrote: To find these we do the following 1.a: Build the CFG of all the instructions so we can walk around the program easily. 1.b: Find the basic blocks and build the basic block CFG. After this with a few helper calls we can move arou

Re: [RFC PATCH bpf-next 0/2] bpf/verifier: simplify subprog tracking

2018-02-13 Thread Alexei Starovoitov
On Tue, Feb 13, 2018 at 06:14:53PM +, Edward Cree wrote: > > Anyway, that's my design, I hope it wasn't _too_ horrifying, and I hope to >  have some RFC patches in the next week or so. I prefer John's approach since it fits into my thinking how verifier should evolve and follows the outline

Re: [RFC PATCH bpf-next 0/2] bpf/verifier: simplify subprog tracking

2018-02-13 Thread Edward Cree
On 13/02/18 05:09, John Fastabend wrote: > I have some code that is getting close to working on bounded loops. Here > is how I think it should work, (with some annotations on what I have). Thanks for this!  For comparison, since my code is also 'getting close to  working' here's how my approach wor

Re: [RFC PATCH bpf-next 0/2] bpf/verifier: simplify subprog tracking

2018-02-12 Thread John Fastabend
On 02/12/2018 02:22 AM, Edward Cree wrote: > On 10/02/18 03:18, Alexei Starovoitov wrote: >> On Thu, Feb 08, 2018 at 07:31:55PM +, 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 nu

Re: [RFC PATCH bpf-next 0/2] bpf/verifier: simplify subprog tracking

2018-02-12 Thread Edward Cree
On 10/02/18 03:18, Alexei Starovoitov wrote: > On Thu, Feb 08, 2018 at 07:31:55PM +, 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

Re: [RFC PATCH bpf-next 0/2] bpf/verifier: simplify subprog tracking

2018-02-09 Thread Alexei Starovoitov
On Thu, Feb 08, 2018 at 07:31:55PM +, 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

[RFC PATCH bpf-next 0/2] bpf/verifier: simplify subprog tracking

2018-02-08 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