aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/samples/bpf/syscall_tp_kern.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-01-20 11:08:11 +1000
committerDave Airlie <airlied@redhat.com>2020-01-20 11:42:57 +1000
commit3d4743131b8de970faa4b979ead0fadfe5d2de9d (patch)
tree68e948c2d94d48598dd37e31bb654feb0b43ae4a /samples/bpf/syscall_tp_kern.c
parentMerge tag 'amd-drm-next-5.6-2020-01-17' of git://people.freedesktop.org/~agd5f/linux into drm-next (diff)
parentLinux 5.5-rc7 (diff)
downloadwireguard-linux-3d4743131b8de970faa4b979ead0fadfe5d2de9d.tar.xz
wireguard-linux-3d4743131b8de970faa4b979ead0fadfe5d2de9d.zip
Backmerge v5.5-rc7 into drm-next
msm needs 5.5-rc4, go to the latest. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'samples/bpf/syscall_tp_kern.c')
-rw-r--r--samples/bpf/syscall_tp_kern.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/samples/bpf/syscall_tp_kern.c b/samples/bpf/syscall_tp_kern.c
index 1d78819ffef1..630ce8c4d5a2 100644
--- a/samples/bpf/syscall_tp_kern.c
+++ b/samples/bpf/syscall_tp_kern.c
@@ -47,13 +47,27 @@ static __always_inline void count(void *map)
SEC("tracepoint/syscalls/sys_enter_open")
int trace_enter_open(struct syscalls_enter_open_args *ctx)
{
- count((void *)&enter_open_map);
+ count(&enter_open_map);
+ return 0;
+}
+
+SEC("tracepoint/syscalls/sys_enter_openat")
+int trace_enter_open_at(struct syscalls_enter_open_args *ctx)
+{
+ count(&enter_open_map);
return 0;
}
SEC("tracepoint/syscalls/sys_exit_open")
int trace_enter_exit(struct syscalls_exit_open_args *ctx)
{
- count((void *)&exit_open_map);
+ count(&exit_open_map);
+ return 0;
+}
+
+SEC("tracepoint/syscalls/sys_exit_openat")
+int trace_enter_exit_at(struct syscalls_exit_open_args *ctx)
+{
+ count(&exit_open_map);
return 0;
}