Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/bpf: Enable timed may_goto verifier tests on s390x

Now that the timed may_goto implementation is available on s390x,
enable the respective verifier tests.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/r/20250821113339.292434-5-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Ilya Leoshkevich and committed by
Alexei Starovoitov
7197dbcb 1e4e6b9e

+7 -3
+1 -1
tools/testing/selftests/bpf/prog_tests/stream.c
··· 77 77 ASSERT_OK(ret, "ret"); 78 78 ASSERT_OK(opts.retval, "retval"); 79 79 80 - #if !defined(__x86_64__) 80 + #if !defined(__x86_64__) && !defined(__s390x__) 81 81 ASSERT_TRUE(1, "Timed may_goto unsupported, skip."); 82 82 if (i == 0) { 83 83 ret = bpf_prog_stream_read(prog_fd, 2, buf, sizeof(buf), &ropts);
+6 -2
tools/testing/selftests/bpf/progs/verifier_may_goto_1.c
··· 9 9 SEC("raw_tp") 10 10 __description("may_goto 0") 11 11 __arch_x86_64 12 + __arch_s390x 12 13 __xlated("0: r0 = 1") 13 14 __xlated("1: exit") 14 15 __success ··· 28 27 SEC("raw_tp") 29 28 __description("batch 2 of may_goto 0") 30 29 __arch_x86_64 30 + __arch_s390x 31 31 __xlated("0: r0 = 1") 32 32 __xlated("1: exit") 33 33 __success ··· 49 47 SEC("raw_tp") 50 48 __description("may_goto batch with offsets 2/1/0") 51 49 __arch_x86_64 50 + __arch_s390x 52 51 __xlated("0: r0 = 1") 53 52 __xlated("1: exit") 54 53 __success ··· 72 69 } 73 70 74 71 SEC("raw_tp") 75 - __description("may_goto batch with offsets 2/0 - x86_64") 72 + __description("may_goto batch with offsets 2/0 - x86_64 and s390x") 76 73 __arch_x86_64 74 + __arch_s390x 77 75 __xlated("0: *(u64 *)(r10 -16) = 65535") 78 76 __xlated("1: *(u64 *)(r10 -8) = 0") 79 77 __xlated("2: r11 = *(u64 *)(r10 -16)") ··· 88 84 __xlated("10: r0 = 2") 89 85 __xlated("11: exit") 90 86 __success 91 - __naked void may_goto_batch_2_x86_64(void) 87 + __naked void may_goto_batch_2_x86_64_s390x(void) 92 88 { 93 89 asm volatile ( 94 90 ".8byte %[may_goto1];"