public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
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: Sun, 05 Oct 2025 12:24:30 +0200	[thread overview]
Message-ID: <87plb17ijl.fsf@fau.de> (raw)
In-Reply-To: <878qhr69jb.fsf@fau.de> (Luis Gerhorst's message of "Fri, 03 Oct 2025 21:59:52 +0200")

Luis Gerhorst <luis.gerhorst@fau.de> writes:

> Some test still fail because the '#ifdef SPEC_V1' is still missing for
> them. I will prepare a patch to resolve this.

I now tried around a little and in conclusion I think it would be best
for you to instead disable unpriv tests by adding a 'return -1' for
LoongArch/PowerPC (the only archs setting bpf_jit_bypass_spec_v1) in
get_mitigations_off().

Using SPEC_V1 to also test that certain errors do not occur on archs
like LoongArch gets complicated pretty quickly. This is because we then
have to also set SPEC_V1 on archs that do not have
bpf_jit_bypass_spec_v1() set (e.g., s390x) to test load failure/success
correctly. Also, we still have to disable unpriv tests for PowerPC
(because jit_bypass_spec_v1 is dynamic there), and we have to change
SPEC_V1/xlated tests to take thing like zext into consideration to make
them work on s390x. I tried everything except for the zext stuff, see
the series sent in reply to this.

Currently, '#ifdef SPEC_V1' is only used to add additional __xlated
tests for x86/ARM, not to determine the load failure/success expected.
Therefore, this complexity is currently avoided.

  reply	other threads:[~2025-10-05 10:24 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
2025-10-05 10:24   ` Luis Gerhorst [this message]
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=87plb17ijl.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