bpf: move knowledge about post-translation offsets out of verifier
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 16 Oct 2017 23:40:55 +0000 (16:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Oct 2017 13:17:10 +0000 (14:17 +0100)
commit4f9218aaf8a463f76cac40aa08d859d065f8cc9e
tree452f891add36a71c8db10523ffe736a49371ebcd
parent00176a34d9e27ab1e77db75fe13abc005cffe0ca
bpf: move knowledge about post-translation offsets out of verifier

Use the fact that verifier ops are now separate from program
ops to define a separate set of callbacks for verification of
already translated programs.

Since we expect the analyzer ops to be defined only for
a small subset of all program types initialize their array
by hand (don't use linux/bpf_types.h).

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/bpf.h
kernel/bpf/verifier.c
net/core/filter.c