Skip to content

BPF testsuite and cleanup

Alexei Starovoitov netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3net: filter: make BPF conversion more readableinclude/linux/filter.h net/core/filter.c+101 -920 replies
2/3net: filter: BPF testsuitelib/Kconfig.debug lib/Makefile lib/test_bpf.c +1 more+343 -10 replies
3/3net: filter: additional BPF testslib/test_bpf.c+1224 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/3] BPF testsuite and cleanup

This patchset adds BPF testsuite and improves readability of classic to internal BPF converter.

The testsuite helped to find 'negative offset bug' in x64 JIT that was fixed by commit fdfaf64e ("x86: bpf_jit: support negative offsets")

It can be very useful for classic and internal JIT compiler developers. Also it serves as performance benchmark.

x86_64/i386 pass all tests with and without JIT. arm32 JIT is failing negative offset tests which are unsupported.

Internal BPF tests are much larger than classic tests to cover different combinations of registers. Negative tests check correctness of classic BPF verifier which must reject them.

Alexei Starovoitov (3):
net: filter: make BPF conversion more readable
net: filter: BPF testsuite
net: filter: additional BPF tests

 include/linux/filter.h               |   51 ++
 lib/Kconfig.debug                    |   13 +
 lib/Makefile                         |    1 +
 lib/test_bpf.c                       | 1546 ++++++++++++++++++++++++++++++++++
 net/core/filter.c                    |  142 ++--
 tools/testing/selftests/net/Makefile |    8 +-
 6 files changed, 1668 insertions(+), 93 deletions(-)
 create mode 100644 lib/test_bpf.c
Signature · 1 line
1.7.9.5