aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bpf.h
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@plumgrid.com>2014-09-26 03:17:02 -0400
committerDavid S. Miller <davem@davemloft.net>2014-09-26 15:05:14 -0400
commit51580e798cb61b0fc63fa3aa6c5c975375aa0550 (patch)
tree2b608f048ba6415a28be79135af26f28ba7ebd5b /include/linux/bpf.h
parent0a542a86d73b1577e7d4f55fc95dcffd3fe62643 (diff)
bpf: verifier (add docs)
this patch adds all of eBPF verfier documentation and empty bpf_check() The end goal for the verifier is to statically check safety of the program. Verifier will catch: - loops - out of range jumps - unreachable instructions - invalid instructions - uninitialized register access - uninitialized stack access - misaligned stack access - out of range stack access - invalid calling convention More details in Documentation/networking/filter.txt Signed-off-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r--include/linux/bpf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 92979182be81..9dfeb36f8971 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -83,5 +83,7 @@ struct bpf_prog_aux {
83 83
84void bpf_prog_put(struct bpf_prog *prog); 84void bpf_prog_put(struct bpf_prog *prog);
85struct bpf_prog *bpf_prog_get(u32 ufd); 85struct bpf_prog *bpf_prog_get(u32 ufd);
86/* verify correctness of eBPF program */
87int bpf_check(struct bpf_prog *fp, union bpf_attr *attr);
86 88
87#endif /* _LINUX_BPF_H */ 89#endif /* _LINUX_BPF_H */