Re: [PATCH bpf-next 06/11] bpf: Add reference tracking to verifier

2018-09-13 Thread Joe Stringer
On Wed, 12 Sep 2018 at 16:17, Alexei Starovoitov wrote: > > On Tue, Sep 11, 2018 at 05:36:35PM -0700, Joe Stringer wrote: > > ... > > + > > +/* release function corresponding to acquire_reference_state(). > > Idempotent. */ > > +static int __release_reference_state(struct bpf_func_state *state, i

Re: [PATCH bpf-next 06/11] bpf: Add reference tracking to verifier

2018-09-12 Thread Alexei Starovoitov
On Tue, Sep 11, 2018 at 05:36:35PM -0700, Joe Stringer wrote: > Allow helper functions to acquire a reference and return it into a > register. Specific pointer types such as the PTR_TO_SOCKET will > implicitly represent such a reference. The verifier must ensure that > these references are released

[PATCH bpf-next 06/11] bpf: Add reference tracking to verifier

2018-09-11 Thread Joe Stringer
Allow helper functions to acquire a reference and return it into a register. Specific pointer types such as the PTR_TO_SOCKET will implicitly represent such a reference. The verifier must ensure that these references are released exactly once in each path through the program. To achieve this, this