Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1716848

Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning

From Edward Cree <ecree@solarflare.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning
Date 2017-08-21 22:30 +0200
Message-ID <uh1uH-Ac-41@gated-at.bofh.it> (permalink)
References <uePQZ-5sj-3@gated-at.bofh.it> <ufQhX-4UA-21@gated-at.bofh.it> <ufQhX-4UA-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 18/08/17 15:16, Edward Cree wrote:
> On 18/08/17 04:21, Alexei Starovoitov wrote:
>> It seems you're trying to sort-of do per-fake-basic block liveness
>> analysis, but our state_list_marks are not correct if we go with
>> canonical basic block definition, since we mark the jump insn and
>> not insn after the branch and not every basic block boundary is
>> properly detected.
> I think the reason this works is that jump insns can't do writes.
> [snip]
> the sl->state will never have any write marks and it'll all just work.
> But I should really test that!
I tested this, and found that, no, sl->state can have write marks, and the
 algorithm will get the wrong answer in that case.  So I've got a patch to
 make the first iteration ignore write marks, as part of a series which I
 will post shortly.  When I do so, please re-do your tests with adding
 state_list_marks in strange and exciting places; it should work wherever
 you put them.  Like you say, it "magically doesn't depend on proper basic
 block boundaries", and that's because really pruning is just a kind of
 checkpointing that just happens to be most effective when done just after
 a jump (pop_stack).

Can I have a SOB for your "grr" test program, so I can include it in the
 series?

-Ed

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v3 net-next] bpf/verifier: track liveness for pruning Edward Cree <ecree@solarflare.com> - 2017-08-15 21:40 +0200
  Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning Daniel Borkmann <daniel@iogearbox.net> - 2017-08-16 00:20 +0200
    Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning David Miller <davem@davemloft.net> - 2017-08-16 01:40 +0200
  Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning Edward Cree <ecree@solarflare.com> - 2017-08-18 16:20 +0200
    Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning Edward Cree <ecree@solarflare.com> - 2017-08-21 20:40 +0200
      Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning Daniel Borkmann <daniel@iogearbox.net> - 2017-08-21 22:30 +0200
        Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning Edward Cree <ecree@solarflare.com> - 2017-08-21 22:50 +0200
          Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning Daniel Borkmann <daniel@iogearbox.net> - 2017-08-21 23:10 +0200
    Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning Edward Cree <ecree@solarflare.com> - 2017-08-21 22:30 +0200

csiph-web