diff options
author | David S. Miller <davem@davemloft.net> | 2017-05-10 11:42:48 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-11 14:19:00 -0400 |
commit | 91045f5e5238a6d2ad21d41d7e86e2fa65f90d76 (patch) | |
tree | e9acd575376236e1715bfa6704fdef67f7981a72 /tools/lib/bpf/bpf.h | |
parent | e07b98d9bffe410019dfcf62c3428d4a96c56a2c (diff) | |
download | talos-op-linux-91045f5e5238a6d2ad21d41d7e86e2fa65f90d76.tar.gz talos-op-linux-91045f5e5238a6d2ad21d41d7e86e2fa65f90d76.zip |
bpf: Add bpf_verify_program() to the library.
This allows a test case to load a BPF program and unconditionally
acquire the verifier log.
It also allows specification of the strict alignment flag.
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/lib/bpf/bpf.h')
-rw-r--r-- | tools/lib/bpf/bpf.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/lib/bpf/bpf.h b/tools/lib/bpf/bpf.h index edb4daeff7a5..972bd8333eb7 100644 --- a/tools/lib/bpf/bpf.h +++ b/tools/lib/bpf/bpf.h @@ -35,6 +35,10 @@ int bpf_load_program(enum bpf_prog_type type, const struct bpf_insn *insns, size_t insns_cnt, const char *license, __u32 kern_version, char *log_buf, size_t log_buf_sz); +int bpf_verify_program(enum bpf_prog_type type, const struct bpf_insn *insns, + size_t insns_cnt, int strict_alignment, + const char *license, __u32 kern_version, + char *log_buf, size_t log_buf_sz); int bpf_map_update_elem(int fd, const void *key, const void *value, __u64 flags); |