Re: [PATCH bpf-next 4/4] bpf: add self-check logic to liveness analysis

2018-12-13 Thread Edward Cree
On 13/12/18 00:00, Alexei Starovoitov wrote: > luckily found it in my email archives. next time could you send a link to > make sure we're talking about the same patch? Sorry, will do. > back then there was no per-register chains and push_stack() > has to do only one live_children++. > With per-re

Re: [PATCH bpf-next 4/4] bpf: add self-check logic to liveness analysis

2018-12-12 Thread Alexei Starovoitov
On Wed, Dec 12, 2018 at 05:21:35PM -0800, Jakub Kicinski wrote: > On Tue, 11 Dec 2018 21:28:54 -0800, Alexei Starovoitov wrote: > > introduce REG_LIVE_DONE to check the liveness propagation > > and prepare the states for merging > > See algorithm description in clean_live_states(). > > No differenc

Re: [PATCH bpf-next 4/4] bpf: add self-check logic to liveness analysis

2018-12-12 Thread Jakub Kicinski
On Tue, 11 Dec 2018 21:28:54 -0800, Alexei Starovoitov wrote: > introduce REG_LIVE_DONE to check the liveness propagation > and prepare the states for merging > See algorithm description in clean_live_states(). > No difference in tests. > > Signed-off-by: Alexei Starovoitov > @@ -5021,6 +5029,10

Re: [PATCH bpf-next 4/4] bpf: add self-check logic to liveness analysis

2018-12-12 Thread Alexei Starovoitov
On Wed, Dec 12, 2018 at 10:26:17PM +, Edward Cree wrote: > On 12/12/18 22:00, Alexei Starovoitov wrote: > > On Wed, Dec 12, 2018 at 08:58:33PM +, Edward Cree wrote: > >> A different way I previously thought of was to have a refcount in > >>  verifier states (at the time we had a single pare

Re: [PATCH bpf-next 4/4] bpf: add self-check logic to liveness analysis

2018-12-12 Thread Edward Cree
On 12/12/18 22:00, Alexei Starovoitov wrote: > On Wed, Dec 12, 2018 at 08:58:33PM +, Edward Cree wrote: >> A different way I previously thought of was to have a refcount in >>  verifier states (at the time we had a single parent rather than per- >>  register parents) counting live children, tha

Re: [PATCH bpf-next 4/4] bpf: add self-check logic to liveness analysis

2018-12-12 Thread Alexei Starovoitov
On Wed, Dec 12, 2018 at 08:58:33PM +, Edward Cree wrote: > On 12/12/18 05:28, Alexei Starovoitov wrote: > > introduce REG_LIVE_DONE to check the liveness propagation > > and prepare the states for merging > > See algorithm description in clean_live_states(). > > No difference in tests. > > > >

Re: [PATCH bpf-next 4/4] bpf: add self-check logic to liveness analysis

2018-12-12 Thread Edward Cree
On 12/12/18 05:28, Alexei Starovoitov wrote: > introduce REG_LIVE_DONE to check the liveness propagation > and prepare the states for merging > See algorithm description in clean_live_states(). > No difference in tests. > > Signed-off-by: Alexei Starovoitov This feels a bit magic to me, relying as

[PATCH bpf-next 4/4] bpf: add self-check logic to liveness analysis

2018-12-11 Thread Alexei Starovoitov
introduce REG_LIVE_DONE to check the liveness propagation and prepare the states for merging See algorithm description in clean_live_states(). No difference in tests. Signed-off-by: Alexei Starovoitov --- include/linux/bpf_verifier.h | 1 + kernel/bpf/verifier.c| 108 ++