[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_C6AD4AD72BEFE813228FC188905F96C6A506@qq.com>
Date: Tue, 11 Jul 2023 19:14:59 +0800
From: Rong Tao <rtoax@...mail.com>
To: ast@...nel.org
Cc: rongtao@...tc.cn, Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Song Liu <song@...nel.org>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...gle.com>,
Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
bpf@...r.kernel.org (open list:BPF [GENERAL] (Safe Dynamic Programs and
Tools)), linux-kernel@...r.kernel.org (open list)
Subject: [PATCH bpf-next] samples/bpf: syscall_tp: aarch64 no open syscall
From: Rong Tao <rongtao@...tc.cn>
__NR_open never exist on AArch64.
Signed-off-by: Rong Tao <rongtao@...tc.cn>
---
samples/bpf/syscall_tp_kern.c | 4 ++++
1 file changed, 4 insertions(+)
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)
--
2.41.0
Powered by blists - more mailing lists