Skip to content

Commit 4a4c4c0

Browse files
Pu Lehuianakryiko
authored andcommitted
selftests/bpf: Enable test_bpf_syscall_macro: Syscall_arg1 on s390 and arm64
Considering that CO-RE direct read access to the first system call argument is already available on s390 and arm64, let's enable test_bpf_syscall_macro:syscall_arg1 on these architectures. Signed-off-by: Pu Lehui <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 9ab9407 commit 4a4c4c0

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

tools/testing/selftests/bpf/prog_tests/test_bpf_syscall_macro.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ void test_bpf_syscall_macro(void)
3838
/* check whether args of syscall are copied correctly */
3939
prctl(exp_arg1, exp_arg2, exp_arg3, exp_arg4, exp_arg5);
4040

41-
#if defined(__aarch64__) || defined(__s390__)
42-
ASSERT_NEQ(skel->bss->arg1, exp_arg1, "syscall_arg1");
43-
#else
4441
ASSERT_EQ(skel->bss->arg1, exp_arg1, "syscall_arg1");
45-
#endif
4642
ASSERT_EQ(skel->bss->arg2, exp_arg2, "syscall_arg2");
4743
ASSERT_EQ(skel->bss->arg3, exp_arg3, "syscall_arg3");
4844
/* it cannot copy arg4 when uses PT_REGS_PARM4 on x86_64 */

tools/testing/selftests/bpf/progs/bpf_syscall_macro.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ int BPF_KPROBE(handle_sys_prctl)
4343

4444
/* test for PT_REGS_PARM */
4545

46-
#if !defined(bpf_target_arm64) && !defined(bpf_target_s390)
4746
bpf_probe_read_kernel(&tmp, sizeof(tmp), &PT_REGS_PARM1_SYSCALL(real_regs));
48-
#endif
4947
arg1 = tmp;
5048
bpf_probe_read_kernel(&arg2, sizeof(arg2), &PT_REGS_PARM2_SYSCALL(real_regs));
5149
bpf_probe_read_kernel(&arg3, sizeof(arg3), &PT_REGS_PARM3_SYSCALL(real_regs));

0 commit comments

Comments
 (0)