summaryrefslogtreecommitdiffstats
path: root/kernel/bpf/stackmap.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@fb.com>2016-04-07 03:43:27 +0200
committerDavid S. Miller <davem@davemloft.net>2016-04-08 03:04:26 +0200
commit9940d67c93b5bb7ddcf862b41b1847cb728186c4 (patch)
treee5b9a36df5bc8bde9b7435cda796d2cefe686e45 /kernel/bpf/stackmap.c
parentbpf: register BPF_PROG_TYPE_TRACEPOINT program type (diff)
downloadlinux-9940d67c93b5bb7ddcf862b41b1847cb728186c4.tar.xz
linux-9940d67c93b5bb7ddcf862b41b1847cb728186c4.zip
bpf: support bpf_get_stackid() and bpf_perf_event_output() in tracepoint programs
needs two wrapper functions to fetch 'struct pt_regs *' to convert tracepoint bpf context into kprobe bpf context to reuse existing helper functions Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/bpf/stackmap.c')
-rw-r--r--kernel/bpf/stackmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/stackmap.c b/kernel/bpf/stackmap.c
index 499d9e933f8e..35114725cf30 100644
--- a/kernel/bpf/stackmap.c
+++ b/kernel/bpf/stackmap.c
@@ -116,7 +116,7 @@ free_smap:
return ERR_PTR(err);
}
-static u64 bpf_get_stackid(u64 r1, u64 r2, u64 flags, u64 r4, u64 r5)
+u64 bpf_get_stackid(u64 r1, u64 r2, u64 flags, u64 r4, u64 r5)
{
struct pt_regs *regs = (struct pt_regs *) (long) r1;
struct bpf_map *map = (struct bpf_map *) (long) r2;