diff options
author | Andrii Nakryiko <[email protected]> | 2023-01-20 12:08:50 -0800 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2023-01-23 20:52:59 +0100 |
commit | 3c59623d82947c8bfcc2fbf34c5eab02493b3b28 (patch) | |
tree | 2ec88aba75b3daec12c656dcf6e8458a931d4b68 /tools/testing/selftests/bpf/prog_tests/autoload.c | |
parent | 7525daeefc8c20902bac63f89603096c76808fe0 (diff) |
libbpf: Add support for fetching up to 8 arguments in kprobes
Add BPF_KPROBE() and PT_REGS_PARMx() support for up to 8 arguments, if
target architecture supports this. Currently all architectures are
limited to only 5 register-placed arguments, which is limiting even on
x86-64.
This patch adds generic macro machinery to support up to 8 arguments
both when explicitly fetching it from pt_regs through PT_REGS_PARMx()
macros, as well as more ergonomic access in BPF_KPROBE().
Also, for i386 architecture we now don't have to define fake PARM4 and
PARM5 definitions, they will be generically substituted, just like for
PARM6 through PARM8.
Subsequent patches will fill out architecture-specific definitions,
where appropriate.
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Tested-by: Alan Maguire <[email protected]> # arm64
Tested-by: Ilya Leoshkevich <[email protected]> # s390x
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions