mbox series

[bpf-next,0/3] bpf: improve BPF_JSET test coverage and verifier handling

Message ID 20181213034110.24361-1-jakub.kicinski@netronome.com
Headers show
Series bpf: improve BPF_JSET test coverage and verifier handling | expand

Message

Jakub Kicinski Dec. 13, 2018, 3:41 a.m. UTC
Hi!

This small set is the first step to dead code elimination I'm working
on, but it stands on its own.  I want to make the verifier understand
JSET instruction better so we can remove some trivial dead code
optimizations from the nfp JIT.

First patch adds a functional test for JSET, because AFAICT LLVM does
not generate that instruction so JITs probably don't get well tested.
Second patch make the verifier understand JSET in the same way it
already understands all the other conditional jump instructions.
Last but not least the test cases for patch 2.

Jakub Kicinski (3):
  selftests: bpf: add trivial JSET test
  bpf: verifier: teach the verifier to reason about the BPF_JSET
    instruction
  selftests: bpf: verifier: add tests for JSET interpretation

 kernel/bpf/verifier.c                       | 20 +++++
 tools/testing/selftests/bpf/test_progs.c    | 69 +++++++++++++++
 tools/testing/selftests/bpf/test_verifier.c | 96 +++++++++++++++++++++
 3 files changed, 185 insertions(+)