]> git.hungrycats.org Git - linux/commit
libbpf: Access first syscall argument with CO-RE direct read on arm64
authorPu Lehui <pulehui@huawei.com>
Sat, 31 Aug 2024 04:19:32 +0000 (04:19 +0000)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 5 Sep 2024 00:06:06 +0000 (17:06 -0700)
commit9ab94078e868a45cbd23828b8377600b83a41fac
tree0300e1cd697e491014a45689f0ce1db2375cc028
parente4db2a821b6cff4bd59c0efabdbfdd84ac6005c1
libbpf: Access first syscall argument with CO-RE direct read on arm64

Currently PT_REGS_PARM1 SYSCALL(x) is consistent with PT_REGS_PARM1_CORE
SYSCALL(x), which will introduce the overhead of BPF_CORE_READ(), taking
into account the read pt_regs comes directly from the context, let's use
CO-RE direct read to access the first system call argument.

Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Pu Lehui <pulehui@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Xu Kuohai <xukuohai@huawei.com>
Link: https://lore.kernel.org/bpf/20240831041934.1629216-3-pulehui@huaweicloud.com
tools/lib/bpf/bpf_tracing.h