projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab8684b
)
samples/bpf: Add openat2() enter/exit tracepoint to syscall_tp sample
author
Rong Tao
<rongtao@cestc.cn>
Wed, 8 Feb 2023 01:04:41 +0000
(09:04 +0800)
committer
Andrii Nakryiko
<andrii@kernel.org>
Thu, 9 Feb 2023 00:50:42 +0000
(16:50 -0800)
Commit
fe3300897cbf
("samples: bpf: fix syscall_tp due to unused syscall")
added openat() syscall tracepoints. This patch adds support for
openat2() as well.
Signed-off-by: Rong Tao <rongtao@cestc.cn>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link:
https://lore.kernel.org/bpf/tencent_9381CB1A158ED7ADD12C4406034E21A3AC07@qq.com
samples/bpf/syscall_tp_kern.c
patch
|
blob
|
blame
|
history
diff --git
a/samples/bpf/syscall_tp_kern.c
b/samples/bpf/syscall_tp_kern.c
index 50231c2eff9cfa4bbef0695dfa41d47b4ee071f5..e7121dd1ee3773004e28b4e379e9b8b30e22d015 100644
(file)
--- a/
samples/bpf/syscall_tp_kern.c
+++ b/
samples/bpf/syscall_tp_kern.c
@@
-58,6
+58,13
@@
int trace_enter_open_at(struct syscalls_enter_open_args *ctx)
return 0;
}
+SEC("tracepoint/syscalls/sys_enter_openat2")
+int trace_enter_open_at2(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)
{
@@
-71,3
+78,10
@@
int trace_enter_exit_at(struct syscalls_exit_open_args *ctx)
count(&exit_open_map);
return 0;
}
+
+SEC("tracepoint/syscalls/sys_exit_openat2")
+int trace_enter_exit_at2(struct syscalls_exit_open_args *ctx)
+{
+ count(&exit_open_map);
+ return 0;
+}