]> git.baikalelectronics.ru Git - kernel.git/commit
test_bpf: assign type to native eBPF test cases
authorDaniel Borkmann <daniel@iogearbox.net>
Thu, 30 Jul 2015 10:42:46 +0000 (12:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Jul 2015 18:13:20 +0000 (11:13 -0700)
commita9b52ffb27e400f38d449e6ac2b0a1a7447a0327
treef813e5296c805668bb463f7db4075343307d406f
parenta23632050d4ab77bd02bc74b1c2a156357511777
test_bpf: assign type to native eBPF test cases

As JITs start to perform optimizations whether to clear A and X on eBPF
programs in the prologue, we should actually assign a program type to the
native eBPF test cases. It doesn't really matter which program type, as
these instructions don't go through the verifier, but it needs to be a
type != BPF_PROG_TYPE_UNSPEC. This reflects eBPF programs loaded via bpf(2)
system call (!= type unspec) vs. classic BPF to eBPF migrations (== type
unspec).

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
lib/test_bpf.c