summaryrefslogtreecommitdiffstats
path: root/include/linux/bpf.h
diff options
context:
space:
mode:
authorAlexei Starovoitov2015-06-13 04:39:13 +0200
committerDavid S. Miller2015-06-16 00:53:50 +0200
commit0756ea3e85139d23a8148ebaa95411c2f0aa4f11 (patch)
tree16b702c8ca6da39fc16188f3bf767d238df8b5ff /include/linux/bpf.h
parentbpf: introduce current->pid, tgid, uid, gid, comm accessors (diff)
downloadkernel-qcow2-linux-0756ea3e85139d23a8148ebaa95411c2f0aa4f11.tar.gz
kernel-qcow2-linux-0756ea3e85139d23a8148ebaa95411c2f0aa4f11.tar.xz
kernel-qcow2-linux-0756ea3e85139d23a8148ebaa95411c2f0aa4f11.zip
bpf: allow networking programs to use bpf_trace_printk() for debugging
bpf_trace_printk() is a helper function used to debug eBPF programs. Let socket and TC programs use it as well. Note, it's DEBUG ONLY helper. If it's used in the program, the kernel will print warning banner to make sure users don't use it in production. 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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 1b9a3f5b27f6..4383476a0d48 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -150,6 +150,7 @@ struct bpf_array {
u64 bpf_tail_call(u64 ctx, u64 r2, u64 index, u64 r4, u64 r5);
void bpf_prog_array_map_clear(struct bpf_map *map);
bool bpf_prog_array_compatible(struct bpf_array *array, const struct bpf_prog *fp);
+const struct bpf_func_proto *bpf_get_trace_printk_proto(void);
#ifdef CONFIG_BPF_SYSCALL
void bpf_register_prog_type(struct bpf_prog_type_list *tl);