From: Luis Gerhorst <luis.gerhorst@fau.de>
To: Hengqi Chen <hengqi.chen@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
Eduard Zingerman <eddyz87@gmail.com>,
Tiezhu Yang <yangtiezhu@loongson.cn>, bpf <bpf@vger.kernel.org>
Subject: Re: Some unpriv verifier tests failed due to bpf_jit_bypass_spec_v1
Date: Fri, 03 Oct 2025 21:59:52 +0200 [thread overview]
Message-ID: <878qhr69jb.fsf@fau.de> (raw)
In-Reply-To: <CAEyhmHTvj4cDRfu1FXSEXmdCqyWfs3ehw5gtB9qJCrThuUy2Kw@mail.gmail.com> (Hengqi Chen's message of "Tue, 23 Sep 2025 17:52:11 +0800")
Hengqi Chen <hengqi.chen@gmail.com> writes:
> Some unpriv verifier tests (e.g. bounds_map_value_variant_2) failed
> on LoongArch which implements bpf_jit_bypass_spec_v1().
>
> This is because some verifier paths do can_skip_alu_sanitation().
> So for such cases, the priv/unpriv test cases will have the same
> verifier error messages and the tests failed with unexpected error
> messages.
>
> How can we fix them?
Please excuse the late reply.
The most simple fix would be to add the missing '#ifdef SPEC_V1' to
these tests, however, I anyway intend to send a new version of [1] which
removes some of these errors altogether. The patch did not get merged
with the rest of the series earlier because there was a merge conflict
with another fix (now resolved).
I ran the CI with bypass_spec_v1 set for x86 to reproduce your issue [2]
and the patch fixes some of the tests as expected [3]. Can you confirm
this is the same for LoongArch?
Some test still fail because the '#ifdef SPEC_V1' is still missing for
them. I will prepare a patch to resolve this.
[1] https://lore.kernel.org/all/CAADnVQLC_zViaCs5Huu63Jr2oCx1NGY3f_VCkJhrKvqst7HL=g@mail.gmail.com/
[2] https://github.com/kernel-patches/bpf/pull/9929
[3] https://github.com/kernel-patches/bpf/pull/9927
next prev parent reply other threads:[~2025-10-03 20:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-23 9:52 Some unpriv verifier tests failed due to bpf_jit_bypass_spec_v1 Hengqi Chen
2025-10-03 19:59 ` Luis Gerhorst [this message]
2025-10-05 10:24 ` Luis Gerhorst
2025-10-05 10:35 ` [RFC 1/3] bpf: Fall back to nospec for sanitization-failures Luis Gerhorst
2025-10-05 10:41 ` [RFC 2/3] selftests/bpf: Fix SPEC_V1/V4 for other archs Luis Gerhorst
2025-10-05 10:45 ` [RFC 3/3] selftests/bpf: Add missing SPEC_V1-ifdefs Luis Gerhorst
2026-01-09 0:05 ` Alexei Starovoitov
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=878qhr69jb.fsf@fau.de \
--to=luis.gerhorst@fau.de \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=eddyz87@gmail.com \
--cc=hengqi.chen@gmail.com \
--cc=yangtiezhu@loongson.cn \
--cc=yonghong.song@linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox