mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@fb.com>
To: Edward Cree <ecree@solarflare.com>, <davem@davemloft.net>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Daniel Borkmann <daniel@iogearbox.net>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	iovisor-dev <iovisor-dev@lists.iovisor.org>
Subject: Re: [PATCH v3 net-next] bpf/verifier: track liveness for pruning
Date: Mon, 21 Aug 2017 14:18:45 -0700	[thread overview]
Message-ID: <c0ea0e4a-75f4-652c-9967-1de5a4173157@fb.com> (raw)
In-Reply-To: <e4075575-b12c-5c6f-bac3-0c7ba8e04802@solarflare.com>

On 8/21/17 1:24 PM, Edward Cree wrote:
> 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?

yes. of course. just give the test some reasonable name :)

      reply	other threads:[~2017-08-21 21:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-15 19:34 Edward Cree
2017-08-15 22:12 ` Daniel Borkmann
2017-08-15 23:32   ` David Miller
2017-08-18  3:21 ` Alexei Starovoitov
2017-08-18 14:16   ` Edward Cree
2017-08-18 23:37     ` Alexei Starovoitov
2017-08-21 18:36       ` Edward Cree
2017-08-21 20:27         ` Daniel Borkmann
2017-08-21 20:44           ` Edward Cree
2017-08-21 21:00             ` Daniel Borkmann
2017-08-21 21:23               ` Alexei Starovoitov
2017-08-21 20:24     ` Edward Cree
2017-08-21 21:18       ` Alexei Starovoitov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c0ea0e4a-75f4-652c-9967-1de5a4173157@fb.com \
    --to=ast@fb.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=ecree@solarflare.com \
    --cc=iovisor-dev@lists.iovisor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®