diff options
| author | Andrii Nakryiko <[email protected]> | 2020-03-13 17:23:35 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2020-03-13 22:30:53 +0000 |
| commit | b8ebce86ffe655ac15a841bba2d645105ffe3d38 (patch) | |
| tree | 342c3e6a8f11df30291dafd552e2427846c67971 /tools/testing/selftests/bpf/prog_tests/vmlinux.c | |
| parent | libbpf: Ignore incompatible types with matching name during CO-RE relocation (diff) | |
| download | kernel-b8ebce86ffe655ac15a841bba2d645105ffe3d38.tar.gz kernel-b8ebce86ffe655ac15a841bba2d645105ffe3d38.zip | |
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 <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Martin KaFai Lau <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/vmlinux.c')
0 files changed, 0 insertions, 0 deletions
