All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Chaignon <paul.chaignon@gmail.com>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Hengqi Chen <hengqi.chen@gmail.com>,
	loongarch@lists.linux.dev, bpf@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next v1 2/2] selftests/bpf: Add alignment flag for test_verifier 190 testcase
Date: Wed, 11 Mar 2026 17:13:31 +0100	[thread overview]
Message-ID: <abGUq0yFfzUcY5Vh@mail.gmail.com> (raw)
In-Reply-To: <20260310064507.4228-3-yangtiezhu@loongson.cn>

On Tue, Mar 10, 2026 at 02:45:07PM +0800, Tiezhu Yang wrote:
> 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 <yangtiezhu@loongson.cn>
> ---
>  tools/testing/selftests/bpf/verifier/calls.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/bpf/verifier/calls.c b/tools/testing/selftests/bpf/verifier/calls.c
> index 86887130a0ef..29e57f0e56c3 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,
>  },

Acked-by: Paul Chaignon <paul.chaignon@gmail.com>

>  {
>  	"calls: two calls that receive map_value via arg=ptr_stack_of_caller. test1",
> -- 
> 2.42.0
> 
> 

      parent reply	other threads:[~2026-03-11 16:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10  6:45 [PATCH bpf-next v1 0/2] Modify some code about test_verifier Tiezhu Yang
2026-03-10  6:45 ` [PATCH bpf-next v1 1/2] selftests/bpf: Check alignment flag if expected result is REJECT Tiezhu Yang
2026-03-11 15:56   ` Emil Tsalapatis
2026-03-12  6:59     ` Tiezhu Yang
2026-03-12  9:29       ` Paul Chaignon
2026-03-12 11:06         ` Tiezhu Yang
2026-03-16 13:04           ` Paul Chaignon
2026-03-17  1:56             ` Tiezhu Yang
2026-03-11 16:11   ` Paul Chaignon
2026-03-10  6:45 ` [PATCH bpf-next v1 2/2] selftests/bpf: Add alignment flag for test_verifier 190 testcase Tiezhu Yang
2026-03-11 15:57   ` Emil Tsalapatis
2026-03-11 16:13   ` Paul Chaignon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=abGUq0yFfzUcY5Vh@mail.gmail.com \
    --to=paul.chaignon@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=hengqi.chen@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=yangtiezhu@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.