The libbpf folks did the following here: libbpf/libbpf@9f6e3a7
I do not have a arm64 machine currently to test whether accessing the first syscall using aya works, but I stumbled over this while looking into their implementation and though this might be relevant here, as aya is just using arg[0] for pt_regs.
Also for syscalls on other platforms there are some differences, for example on x86_64 the 4th (starting from 1) argument is passed via r10 instaed of rcx like normal.
Maybe a note that PtRegs cannot be used for syscall arguments, tests or another struct for Syscall arguments might be useful. Let me know what you prefer.
Edit:
Relevant code here:
The libbpf folks did the following here: libbpf/libbpf@9f6e3a7
I do not have a arm64 machine currently to test whether accessing the first syscall using aya works, but I stumbled over this while looking into their implementation and though this might be relevant here, as
ayais just usingarg[0]for pt_regs.Also for syscalls on other platforms there are some differences, for example on
x86_64the 4th (starting from 1) argument is passed viar10instaed ofrcxlike normal.Maybe a note that
PtRegscannot be used for syscall arguments, tests or another struct for Syscall arguments might be useful. Let me know what you prefer.Edit:
Relevant code here: