From: Sun Jian <sun.jian.kdev@gmail.com>
To: bpf@vger.kernel.org, linux-kselftest@vger.kernel.org
Cc: andrii@kernel.org, eddyz87@gmail.com, ast@kernel.org,
daniel@iogearbox.net, martin.lau@linux.dev, song@kernel.org,
yonghong.song@linux.dev, john.fastabend@gmail.com,
kpsingh@kernel.org, sdf@fomichev.me, haoluo@google.com,
jolsa@kernel.org, shuah@kernel.org,
Sun Jian <sun.jian.kdev@gmail.com>
Subject: [PATCH v2] selftests/bpf: avoid jump seq limit in verif_scale_pyperf600
Date: Fri, 6 Mar 2026 20:00:24 +0800 [thread overview]
Message-ID: <20260306120024.1032301-1-sun.jian.kdev@gmail.com> (raw)
pyperf600 is a verifier scale test. With newer LLVM, calling __on_event()
twice can push the generated program over the verifier jump sequence
complexity limit (8192), failing with:
The sequence of 8193 jumps is too complex.
Let pyperf600 provide its own on_event() that calls __on_event() once, and
guard the shared wrapper accordingly. Other pyperf600 variants are
unaffected.
Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com>
---
v2:
- Drop runtime -E2BIG skip; instead tweak pyperf600 program source to avoid
hitting the verifier jump sequence complexity limit.
- verif_scale_pyperf600 now passes; other pyperf600 variants unchanged.
tools/testing/selftests/bpf/progs/pyperf.h | 4 +++-
tools/testing/selftests/bpf/progs/pyperf600.c | 7 +++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/progs/pyperf.h b/tools/testing/selftests/bpf/progs/pyperf.h
index 86484f07e1d1..c02c49c52c77 100644
--- a/tools/testing/selftests/bpf/progs/pyperf.h
+++ b/tools/testing/selftests/bpf/progs/pyperf.h
@@ -343,8 +343,9 @@ int __on_event(struct bpf_raw_tracepoint_args *ctx)
return 0;
}
+#ifndef PYPERF_CUSTOM_ON_EVENT
SEC("raw_tracepoint/kfree_skb")
-int on_event(struct bpf_raw_tracepoint_args* ctx)
+int on_event(struct bpf_raw_tracepoint_args *ctx)
{
int ret = 0;
ret |= __on_event(ctx);
@@ -354,5 +355,6 @@ int on_event(struct bpf_raw_tracepoint_args* ctx)
ret |= __on_event(ctx);
return ret;
}
+#endif
char _license[] SEC("license") = "GPL";
diff --git a/tools/testing/selftests/bpf/progs/pyperf600.c b/tools/testing/selftests/bpf/progs/pyperf600.c
index ce1aa5189cc4..31e8a422d804 100644
--- a/tools/testing/selftests/bpf/progs/pyperf600.c
+++ b/tools/testing/selftests/bpf/progs/pyperf600.c
@@ -9,4 +9,11 @@
* the loop will still execute 600 times.
*/
#define UNROLL_COUNT 150
+#define PYPERF_CUSTOM_ON_EVENT
#include "pyperf.h"
+
+SEC("raw_tracepoint/kfree_skb")
+int on_event(struct bpf_raw_tracepoint_args *ctx)
+{
+ return __on_event(ctx);
+}
base-commit: 5ee8dbf54602dc340d6235b1d6aa17c0f283f48c
--
2.43.0
next reply other threads:[~2026-03-06 12:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-06 12:00 Sun Jian [this message]
2026-03-06 16:14 ` [PATCH v2] selftests/bpf: avoid jump seq limit in verif_scale_pyperf600 Paul Chaignon
2026-03-06 16:23 ` Alexei Starovoitov
2026-03-08 5:55 ` sun jian
2026-03-08 8:12 ` Eduard Zingerman
2026-03-08 10:01 ` sun jian
2026-03-08 16:08 ` 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=20260306120024.1032301-1-sun.jian.kdev@gmail.com \
--to=sun.jian.kdev@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--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