netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] bpf: add search pruning optimization and tests
@ 2014-09-30  1:50 Alexei Starovoitov
  2014-09-30  1:50 ` [PATCH net-next 1/2] bpf: add search pruning optimization to verifier Alexei Starovoitov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alexei Starovoitov @ 2014-09-30  1:50 UTC (permalink / raw)
  To: David S. Miller
  Cc: Ingo Molnar, Linus Torvalds, Andy Lutomirski, Daniel Borkmann,
	Hannes Frederic Sowa, Chema Gonzalez, Eric Dumazet,
	Peter Zijlstra, Pablo Neira Ayuso, H. Peter Anvin, Andrew Morton,
	Kees Cook, netdev, linux-kernel

Hi All,

patch #1 commit log explains why eBPF verifier has to examine some
instructions multiple times and describes the search pruning optimization
that improves verification speed for branchy programs and allows more
complex programs to be verified successfully.
This patch completes the core verifier logic.

patch #2 adds more verifier tests related to branches and search pruning

I'm still working on Andy's 'bitmask for stack slots' suggestion. It will be
done on top of this patch.

The current verifier algorithm is brute force depth first search with
state pruning. If anyone can come up with another algorithm that demonstrates
better results, we'll replace the algorithm without affecting user space.

Note verifier doesn't guarantee that all possible valid programs are accepted.
Overly complex programs may still be rejected.
Verifier improvements/optimizations will guarantee that if a program
was passing verification in the past, it will still be passing.

Alexei Starovoitov (2):
  bpf: add search pruning optimization to verifier
  bpf: add tests to verifier testsuite

 kernel/bpf/verifier.c       |  146 +++++++++++++++++++++++++++++++++++++++++++
 samples/bpf/test_verifier.c |  130 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 276 insertions(+)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-02  1:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-30  1:50 [PATCH net-next 0/2] bpf: add search pruning optimization and tests Alexei Starovoitov
2014-09-30  1:50 ` [PATCH net-next 1/2] bpf: add search pruning optimization to verifier Alexei Starovoitov
2014-09-30  1:50 ` [PATCH net-next 2/2] bpf: add tests to verifier testsuite Alexei Starovoitov
2014-10-02  1:31 ` [PATCH net-next 0/2] bpf: add search pruning optimization and tests David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).