Fix accessing syscall arguments
Status from this message: Applied to bpf-next with few adjustments in patches 8-10, thanks. I'll
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest10 patches 4 repliesApplied 10/10
- v414 patches 20 repliesSuperseded
- v311 patches 8 repliesApplied 11/11
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 10 patches | 8 replies | Superseded |
Changes in v5 from the cover letter
* Go back to v3.
* Do not touch arch headers.
* Use CO-RE struct flavors to access orig_x0 and orig_gpr2.
* Fail compilation if non-CO-RE macros are used to access the first syscall parameter on arm64 and s390.
* Fix accessing frame pointer on riscv.
Patches in v5 All 10 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | selftests/bpf: Fix an endianness issue in bpf_syscall_macro testtools/ | +4 | 0 replies | Applied |
| 2/10 | libbpf: Add PT_REGS_SYSCALL_REGS macrotools/ | +10 | 0 replies | Applied |
| 3/10 | selftests/bpf: Use PT_REGS_SYSCALL_REGS in bpf_syscall_macrotools/ | +1 | 0 replies | Applied |
| 4/10 | libbpf: Fix accessing syscall arguments on powerpctools/ | +2 | 0 replies | Applied |
| 5/10 | libbpf: Fix riscv register namestools/ | +2 | 0 replies | Applied |
| 6/10 | libbpf: Fix accessing syscall arguments on riscvtools/ | +2 | 0 replies | Applied |
| 7/10 | selftests/bpf: Skip test_bpf_syscall_macro:syscall_arg1 on arm64 and s390tools/ tools/ | +7 | 0 replies | Applied |
| 8/10 | libbpf: Allow overriding PT_REGS_PARM1{_CORE}_SYSCALLtools/ | +4 | 1 reply | Applied |
| 9/10 | libbpf: Fix accessing the first syscall argument on arm64tools/ | +10 | 1 reply | Applied |
| 10/10 | libbpf: Fix accessing the first syscall argument on s390tools/ | +10 | 1 reply | Applied |
Reviews trailers per patch
None of the 10 patches has a Reviewed-by or Acked-by.
| Patch | Naveen N. Rao |
|---|---|
| 1/10 | |
| 2/10 | |
| 3/10 | |
| 4/10 | T-b |
| 5/10 | |
| 6/10 | |
| 7/10 | |
| 8/10 | |
| 9/10 | |
| 10/10 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH bpf-next v5 00/10] Fix accessing syscall arguments
libbpf now has macros to access syscall arguments in an architecture-agnostic manner, but unfortunately they have a number of issues on non-Intel arches, which this series aims to fix.
v1: https://lore.kernel.org/bpf/[email protected]/
v1 -> v2:
* Put orig_gpr2 in place of args[1] on s390 (Vasily).
* Fix arm64, powerpc and riscv (Heiko).
v2: https://lore.kernel.org/bpf/[email protected]/
v2 -> v3:
* Undo args[1] change (Andrii).
* Rename PT_REGS_SYSCALL to PT_REGS_SYSCALL_REGS (Andrii).
* Split the riscv patch (Andrii).
v3: https://lore.kernel.org/bpf/[email protected]/
v3 -> v4:
* Undo arm64's and s390's user_pt_regs changes.
* Use struct pt_regs when vmlinux.h is available (Andrii).
* Use offsetofend for accessing orig_gpr2 and orig_x0 (Andrii).
* Move libbpf's copy of offsetofend to a new header.
* Fix riscv's __PT_FP_REG.
* Use PT_REGS_SYSCALL_REGS in test_probe_user.c.
* Test bpf_syscall_macro with userspace headers.
* Use Naveen's suggestions and code in patches 5 and 6.
* Add warnings to arm64's and s390's ptrace.h (Andrii).
v4: https://lore.kernel.org/bpf/[email protected]/
v4 -> v5:
* Go back to v3.
* Do not touch arch headers.
* Use CO-RE struct flavors to access orig_x0 and orig_gpr2.
* Fail compilation if non-CO-RE macros are used to access the first syscall parameter on arm64 and s390.
* Fix accessing frame pointer on riscv.
Ilya Leoshkevich (10):
selftests/bpf: Fix an endianness issue in bpf_syscall_macro test
libbpf: Add PT_REGS_SYSCALL_REGS macro
selftests/bpf: Use PT_REGS_SYSCALL_REGS in bpf_syscall_macro
libbpf: Fix accessing syscall arguments on powerpc
libbpf: Fix riscv register names
libbpf: Fix accessing syscall arguments on riscv selftests/bpf: Skip test_bpf_syscall_macro:syscall_arg1 on arm64 and
s390
libbpf: Allow overriding PT_REGS_PARM1{_CORE}_SYSCALL
libbpf: Fix accessing the first syscall argument on arm64
libbpf: Fix accessing the first syscall argument on s390
tools/lib/bpf/bpf_tracing.h | 42 ++++++++++++++++++- .../bpf/prog_tests/test_bpf_syscall_macro.c | 4 ++ .../selftests/bpf/progs/bpf_syscall_macro.c | 9 +++- 3 files changed, 51 insertions(+), 4 deletions(-)
Signature · 1 line
2.34.1