samples/bpf: Use BPF_KSYSCALL macro in syscall tracing programs
authorDaniel T. Lee <danieltimlee@gmail.com>
Sat, 24 Dec 2022 07:15:26 +0000 (16:15 +0900)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 29 Dec 2022 22:22:34 +0000 (14:22 -0800)
commitc5ffb26375ad309c858453f17e777b716723d527
tree6314268028d2aa23ce0cb14dd57de1153cc8cbdd
parent2e5c4dd7f81545a98e9f06317347e760749c020b
samples/bpf: Use BPF_KSYSCALL macro in syscall tracing programs

This commit enhances the syscall tracing programs by using the
BPF_SYSCALL macro to reduce the inconvenience of parsing arguments from
pt_regs. By simplifying argument extraction, bpf program will become
clear to understand.

Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20221224071527.2292-6-danieltimlee@gmail.com
samples/bpf/map_perf_test.bpf.c
samples/bpf/test_current_task_under_cgroup.bpf.c
samples/bpf/test_probe_write_user.bpf.c