summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorRong Tao <rongtao@cestc.cn>2023-07-11 19:14:59 +0800
committerAndrii Nakryiko <andrii@kernel.org>2023-07-11 10:02:42 -0700
commit07018b57066e0009c0b9945723f30e532d347ed3 (patch)
treeb926301785560c58d5e78eff6dca9149fabbbf5d /samples
parenta3e7e6b17946f48badce98d7ac360678a0ea7393 (diff)
downloadlwn-07018b57066e0009c0b9945723f30e532d347ed3.tar.gz
lwn-07018b57066e0009c0b9945723f30e532d347ed3.zip
samples/bpf: syscall_tp: Aarch64 no open syscall
__NR_open never exist on AArch64. Signed-off-by: Rong Tao <rongtao@cestc.cn> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/tencent_C6AD4AD72BEFE813228FC188905F96C6A506@qq.com
Diffstat (limited to 'samples')
-rw-r--r--samples/bpf/syscall_tp_kern.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/samples/bpf/syscall_tp_kern.c b/samples/bpf/syscall_tp_kern.c
index e7121dd1ee37..090fecfe641a 100644
--- a/samples/bpf/syscall_tp_kern.c
+++ b/samples/bpf/syscall_tp_kern.c
@@ -44,12 +44,14 @@ static __always_inline void count(void *map)
bpf_map_update_elem(map, &key, &init_val, BPF_NOEXIST);
}
+#if !defined(__aarch64__)
SEC("tracepoint/syscalls/sys_enter_open")
int trace_enter_open(struct syscalls_enter_open_args *ctx)
{
count(&enter_open_map);
return 0;
}
+#endif
SEC("tracepoint/syscalls/sys_enter_openat")
int trace_enter_open_at(struct syscalls_enter_open_args *ctx)
@@ -65,12 +67,14 @@ int trace_enter_open_at2(struct syscalls_enter_open_args *ctx)
return 0;
}
+#if !defined(__aarch64__)
SEC("tracepoint/syscalls/sys_exit_open")
int trace_enter_exit(struct syscalls_exit_open_args *ctx)
{
count(&exit_open_map);
return 0;
}
+#endif
SEC("tracepoint/syscalls/sys_exit_openat")
int trace_enter_exit_at(struct syscalls_exit_open_args *ctx)