summaryrefslogtreecommitdiff
path: root/samples/bpf/test_current_task_under_cgroup.bpf.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/bpf/test_current_task_under_cgroup.bpf.c')
-rw-r--r--samples/bpf/test_current_task_under_cgroup.bpf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/samples/bpf/test_current_task_under_cgroup.bpf.c b/samples/bpf/test_current_task_under_cgroup.bpf.c
index 0b059cee3cba..58b9cf7ed659 100644
--- a/samples/bpf/test_current_task_under_cgroup.bpf.c
+++ b/samples/bpf/test_current_task_under_cgroup.bpf.c
@@ -8,6 +8,8 @@
#include "vmlinux.h"
#include <linux/version.h>
#include <bpf/bpf_helpers.h>
+#include <bpf/bpf_tracing.h>
+#include <bpf/bpf_core_read.h>
struct {
__uint(type, BPF_MAP_TYPE_CGROUP_ARRAY);
@@ -25,7 +27,7 @@ struct {
/* Writes the last PID that called sync to a map at index 0 */
SEC("ksyscall/sync")
-int bpf_prog1(struct pt_regs *ctx)
+int BPF_KSYSCALL(bpf_prog1)
{
u64 pid = bpf_get_current_pid_tgid();
int idx = 0;