Message ID | 20220204145018.1983773-7-iii@linux.ibm.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 730809c15ac24fd0e3e84f561009e2cfbab04846 |
Delegated to: | BPF |
Headers | show |
Series | libbpf: Fix accessing syscall arguments | expand |
diff --git a/tools/testing/selftests/bpf/progs/bpf_syscall_macro.c b/tools/testing/selftests/bpf/progs/bpf_syscall_macro.c index f5c6ef2ff6d1..e7c622cb6a39 100644 --- a/tools/testing/selftests/bpf/progs/bpf_syscall_macro.c +++ b/tools/testing/selftests/bpf/progs/bpf_syscall_macro.c @@ -33,7 +33,7 @@ int BPF_KPROBE(handle_sys_prctl) if (pid != filter_pid) return 0; - real_regs = (struct pt_regs *)PT_REGS_PARM1(ctx); + real_regs = PT_REGS_SYSCALL_REGS(ctx); /* test for PT_REGS_PARM */
Ensure that PT_REGS_SYSCALL_REGS works correctly. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> --- tools/testing/selftests/bpf/progs/bpf_syscall_macro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)