bpf: migrate ebpf ld_abs/ld_ind tests to test_verifier
authorDaniel Borkmann <daniel@iogearbox.net>
Thu, 3 May 2018 23:08:13 +0000 (01:08 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 3 May 2018 23:49:19 +0000 (16:49 -0700)
commit93731ef086cee90af594e62874bb98ae6d6eee91
treea55c4f702636c05a03f3aaecb50e1ab20945f13d
parentb390134c2423c557cac844ee3b7cb52dc1cfab02
bpf: migrate ebpf ld_abs/ld_ind tests to test_verifier

Remove all eBPF tests involving LD_ABS/LD_IND from test_bpf.ko. Reason
is that the eBPF tests from test_bpf module do not go via BPF verifier
and therefore any instruction rewrites from verifier cannot take place.

Therefore, move them into test_verifier which runs out of user space,
so that verfier can rewrite LD_ABS/LD_IND internally in upcoming patches.
It will have the same effect since runtime tests are also performed from
there. This also allows to finally unexport bpf_skb_vlan_{push,pop}_proto
and keep it internal to core kernel.

Additionally, also add further cBPF LD_ABS/LD_IND test coverage into
test_bpf.ko suite.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/bpf.h
lib/test_bpf.c
net/core/filter.c
tools/testing/selftests/bpf/test_verifier.c