From: Tiezhu Yang Date: Tue, 10 Mar 2026 06:45:07 +0000 (+0800) Subject: selftests/bpf: Add alignment flag for test_verifier 190 testcase X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4706504e2c82523af7f12059940121c09d8d6bd;p=thirdparty%2Fkernel%2Flinux.git selftests/bpf: Add alignment flag for test_verifier 190 testcase There exists failure when executing the testcase "./test_verifier 190" if CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set on LoongArch. #190/p calls: two calls that return map_value with incorrect bool check FAIL ... misaligned access off (0x0; 0xffffffffffffffff)+0 size 8 ... Summary: 0 PASSED, 0 SKIPPED, 1 FAILED It means that the program has unaligned accesses, but the kernel sets CONFIG_ARCH_STRICT_ALIGN by default to enable -mstrict-align to prevent unaligned accesses, so add a flag F_NEEDS_EFFICIENT_UNALIGNED_ACCESS into the testcase to avoid the failure. This is somehow similar with the commit ce1f289f541e ("selftests/bpf: Add F_NEEDS_EFFICIENT_UNALIGNED_ACCESS to some tests"). Signed-off-by: Tiezhu Yang Reviewed-by: Emil Tsalapatis Acked-by: Paul Chaignon Link: https://lore.kernel.org/r/20260310064507.4228-3-yangtiezhu@loongson.cn Signed-off-by: Alexei Starovoitov --- diff --git a/tools/testing/selftests/bpf/verifier/calls.c b/tools/testing/selftests/bpf/verifier/calls.c index 86887130a0efb..29e57f0e56c3a 100644 --- a/tools/testing/selftests/bpf/verifier/calls.c +++ b/tools/testing/selftests/bpf/verifier/calls.c @@ -1521,6 +1521,7 @@ .errstr = "R0 invalid mem access 'scalar'", .result_unpriv = REJECT, .errstr_unpriv = "invalid read from stack R7 off=-16 size=8", + .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS, }, { "calls: two calls that receive map_value via arg=ptr_stack_of_caller. test1",