diff options
author | Andrii Nakryiko <andriin@fb.com> | 2020-03-13 10:23:35 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-03-13 23:30:53 +0100 |
commit | b8ebce86ffe655ac15a841bba2d645105ffe3d38 (patch) | |
tree | 342c3e6a8f11df30291dafd552e2427846c67971 /tools/testing/selftests/bpf/prog_tests/vmlinux.c | |
parent | d121e1d34b72c4975ff0340901d926c0aaf98174 (diff) |
libbpf: Provide CO-RE variants of PT_REGS macros
Syscall raw tracepoints have struct pt_regs pointer as tracepoint's first
argument. After that, reading any of pt_regs fields requires bpf_probe_read(),
even for tp_btf programs. Due to that, PT_REGS_PARMx macros are not usable as
is. This patch adds CO-RE variants of those macros that use BPF_CORE_READ() to
read necessary fields. This provides relocatable architecture-agnostic pt_regs
field accesses.
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20200313172336.1879637-4-andriin@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/vmlinux.c')
0 files changed, 0 insertions, 0 deletions