lkml.org 
[lkml]   [2023]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH bpf-next] samples: bpf: Add macro SYSCALL() for aarch64
Date
From: Rong Tao <rongtao@cestc.cn>

kernel arm64/kernel/sys.c macro __SYSCALL() adds a prefix __arm64_, we
should support it for aarch64. The following is the output of the bpftrace
script:

$ sudo bpftrace -l | grep sys_write
...
kprobe:__arm64_sys_write
kprobe:__arm64_sys_writev
...

Signed-off-by: Rong Tao <rongtao@cestc.cn>
---
samples/bpf/trace_common.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/samples/bpf/trace_common.h b/samples/bpf/trace_common.h
index 8cb5400aed1f..fafc699af0a3 100644
--- a/samples/bpf/trace_common.h
+++ b/samples/bpf/trace_common.h
@@ -6,6 +6,8 @@
#define SYSCALL(SYS) "__x64_" __stringify(SYS)
#elif defined(__s390x__)
#define SYSCALL(SYS) "__s390x_" __stringify(SYS)
+#elif defined(__aarch64__)
+#define SYSCALL(SYS) "__arm64_" __stringify(SYS)
#else
#define SYSCALL(SYS) __stringify(SYS)
#endif
--
2.39.1
\
 
 \ /
  Last update: 2023-03-27 00:10    [W:0.040 / U:0.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site