mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 16:53:20 -04:00
selftests/bpf: Enable timed may_goto tests for LoongArch
Enable stream_cond_break, may_goto_interaction, and verifier_may_goto_1 tests for LoongArch, aligning with recent architectural infrastructure support (timed may_goto and arch_bpf_stack_walk JIT). With this patch, the following tests passed on LoongArch: sudo ./test_progs -a stream_success/stream_cond_break sudo ./test_progs -a verifier_bpf_fastcall/may_goto_interaction sudo ./test_progs -a verifier_may_goto_1 Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20260813070906.5164-1-yangtiezhu@loongson.cn
This commit is contained in:
committed by
Daniel Borkmann
parent
84473a7e18
commit
77877bf570
@@ -65,6 +65,7 @@ __arch_x86_64
|
||||
__arch_arm64
|
||||
__arch_s390x
|
||||
__arch_riscv64
|
||||
__arch_loongarch
|
||||
__success __retval(0)
|
||||
__stderr("ERROR: Timeout detected for may_goto instruction")
|
||||
__stderr("CPU: {{[0-9]+}} UID: 0 PID: {{[0-9]+}} Comm: {{.*}}")
|
||||
|
||||
@@ -665,6 +665,7 @@ __naked void may_goto_interaction_x86_64(void)
|
||||
SEC("raw_tp")
|
||||
__arch_arm64
|
||||
__arch_riscv64
|
||||
__arch_loongarch
|
||||
__log_level(4)
|
||||
__msg("subprog 0 (may_goto_interaction) main {{.*}} stack 24")
|
||||
/* may_goto counter at -24 */
|
||||
|
||||
@@ -12,6 +12,7 @@ __arch_x86_64
|
||||
__arch_s390x
|
||||
__arch_arm64
|
||||
__arch_riscv64
|
||||
__arch_loongarch
|
||||
__xlated("0: r0 = 1")
|
||||
__xlated("1: exit")
|
||||
__success
|
||||
@@ -33,6 +34,7 @@ __arch_x86_64
|
||||
__arch_s390x
|
||||
__arch_arm64
|
||||
__arch_riscv64
|
||||
__arch_loongarch
|
||||
__xlated("0: r0 = 1")
|
||||
__xlated("1: exit")
|
||||
__success
|
||||
@@ -56,6 +58,7 @@ __arch_x86_64
|
||||
__arch_s390x
|
||||
__arch_arm64
|
||||
__arch_riscv64
|
||||
__arch_loongarch
|
||||
__xlated("0: r0 = 1")
|
||||
__xlated("1: exit")
|
||||
__success
|
||||
@@ -83,6 +86,7 @@ __arch_x86_64
|
||||
__arch_s390x
|
||||
__arch_arm64
|
||||
__arch_riscv64
|
||||
__arch_loongarch
|
||||
__xlated("0: *(u64 *)(r10 -16) = 65535")
|
||||
__xlated("1: *(u64 *)(r10 -8) = 0")
|
||||
__xlated("2: r12 = *(u64 *)(r10 -16)")
|
||||
@@ -120,6 +124,7 @@ __arch_x86_64
|
||||
__arch_s390x
|
||||
__arch_arm64
|
||||
__arch_riscv64
|
||||
__arch_loongarch
|
||||
__success
|
||||
__retval(0)
|
||||
__naked void timed_may_goto_preserves_regs(void)
|
||||
|
||||
Reference in New Issue
Block a user