From: sashiko-bot@kernel.org
To: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v2 05/17] bpf: Add callx instruction to call bpf subprogs indirectly
Date: Thu, 24 Sep 2026 03:28:04 +0000 [thread overview]
Message-ID: <20260924032804.E679E1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260924031042.1690890-6-alexei.starovoitov@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] selftests/bpf: Test 'invalid call insn1' fails on archs without callx JIT
--
commit ce97408a97c513bf2f81b643bb904a03dbe7cead
Author: Alexei Starovoitov <ast@kernel.org>
bpf: Add callx instruction to call bpf subprogs indirectly
Introduce BPF_JMP | BPF_CALL | BPF_X (opcode 0x8d) 'callx dst_reg'
instruction: indirect call of bpf subprog with address in dst_reg.
That's the encoding LLVM emits for calls via function pointer.
> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> index 74cf24ce30074..eb014bf6a2e87 100644
> --- a/kernel/bpf/verifier.c
> +++ b/kernel/bpf/verifier.c
[ ... ]
> +/* there is no support for callx in the interpreter */
> +static int require_callx_jit(struct bpf_verifier_env *env)
> +{
> + if (!env->prog->jit_requested) {
> + verbose(env, "JIT is required to use callx\n");
> + return -EOPNOTSUPP;
> + }
> + if (!bpf_jit_supports_callx()) {
> + verbose(env, "JIT doesn't support callx\n");
> + return -EOPNOTSUPP;
> + }
> + env->prog->jit_required = true;
> + return 0;
> +}
[ ... ]
> diff --git a/tools/testing/selftests/bpf/verifier/basic_call.c b/tools/testing/selftests/bpf/verifier/basic_call.c
> index a8c6ab4c1622f..0f93c4551f235 100644
> --- a/tools/testing/selftests/bpf/verifier/basic_call.c
> +++ b/tools/testing/selftests/bpf/verifier/basic_call.c
> @@ -4,7 +4,7 @@
> BPF_RAW_INSN(BPF_JMP | BPF_CALL | BPF_X, 0, 0, 0, 0),
> BPF_EXIT_INSN(),
> },
> - .errstr = "unknown opcode 8d",
> + .errstr = "R0 !read_ok",
[Severity: Medium]
Will this strict error string expectation cause the selftest to fail on
architectures that lack callx JIT support?
If the architecture's JIT does not support callx (like RISC-V, S390x,
or PowerPC), or if JIT is disabled, the verifier will prematurely reject
the instruction in require_callx_jit() by emitting "JIT doesn't support
callx" or "JIT is required to use callx", and return -EOPNOTSUPP.
Since the test framework expects an exact match for "R0 !read_ok", this
test might break CI environments on those architectures because the verifier
never reaches the R0 check. Does this test need to handle multiple possible
error strings or be skipped when JIT support is missing?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260924031042.1690890-1-alexei.starovoitov@gmail.com?part=5
next prev parent reply other threads:[~2026-09-24 3:28 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 3:10 [PATCH bpf-next v2 00/17] bpf: Indirect calls of bpf subprogs (callx) Alexei Starovoitov
2026-09-24 3:10 ` [PATCH bpf-next v2 01/17] bpf: Fix infinite loop in check_max_stack_depth() Alexei Starovoitov
2026-09-24 3:10 ` [PATCH bpf-next v2 02/17] selftests/bpf: Test recursion through a global function and a callback Alexei Starovoitov
2026-09-24 3:10 ` [PATCH bpf-next v2 03/17] bpf: Keep functions with address taken when removing dead code Alexei Starovoitov
2026-09-24 3:10 ` [PATCH bpf-next v2 04/17] bpf: Prepare static analysis passes for callx instruction Alexei Starovoitov
2026-09-24 3:56 ` bot+bpf-ci
2026-09-24 4:18 ` Eduard Zingerman
2026-09-24 3:10 ` [PATCH bpf-next v2 05/17] bpf: Add callx instruction to call bpf subprogs indirectly Alexei Starovoitov
2026-09-24 3:28 ` sashiko-bot [this message]
2026-09-24 3:10 ` [PATCH bpf-next v2 06/17] bpf: Add callx calls to the call graph Alexei Starovoitov
2026-09-24 3:26 ` sashiko-bot
2026-09-24 3:56 ` bot+bpf-ci
2026-09-24 5:00 ` Eduard Zingerman
2026-09-24 3:10 ` [PATCH bpf-next v2 07/17] bpf, x86: Add JIT support for callx Alexei Starovoitov
2026-09-24 5:33 ` Eduard Zingerman
2026-09-24 3:10 ` [PATCH bpf-next v2 08/17] bpf, arm64: " Alexei Starovoitov
2026-09-24 3:10 ` [PATCH bpf-next v2 09/17] bpf: Discover subprogs described by func_info Alexei Starovoitov
2026-09-24 5:42 ` Eduard Zingerman
2026-09-24 3:10 ` [PATCH bpf-next v2 10/17] bpf: Recognize pointers to functions in read-only maps Alexei Starovoitov
2026-09-24 3:10 ` [PATCH bpf-next v2 11/17] libbpf: Support pointers to static functions in data when linking Alexei Starovoitov
2026-09-24 3:10 ` [PATCH bpf-next v2 12/17] libbpf: Resolve pointers to functions in read-only data Alexei Starovoitov
2026-09-24 3:27 ` sashiko-bot
2026-09-24 3:10 ` [PATCH bpf-next v2 13/17] libbpf: Treat .data.rel.ro as " Alexei Starovoitov
2026-09-24 3:10 ` [PATCH bpf-next v2 14/17] libbpf: Support pointers to functions in read-only data in light skeleton Alexei Starovoitov
2026-09-24 3:10 ` [PATCH bpf-next v2 15/17] selftests/bpf: Add tests for callx Alexei Starovoitov
2026-09-24 3:56 ` bot+bpf-ci
2026-09-24 3:10 ` [PATCH bpf-next v2 16/17] selftests/bpf: Add tests for callx through pointers in read-only data Alexei Starovoitov
2026-09-24 3:10 ` [PATCH bpf-next v2 17/17] bpf, docs: Document callx instruction Alexei Starovoitov
2026-09-24 5:50 ` [PATCH bpf-next v2 00/17] bpf: Indirect calls of bpf subprogs (callx) patchwork-bot+netdevbpf
2026-09-24 5:55 ` Eduard Zingerman
2026-09-24 6:00 ` Alexei Starovoitov
2026-09-24 17:50 ` Ihor Solodrai
2026-09-24 18:09 ` Alexei Starovoitov
2026-09-28 23:13 ` Ihor Solodrai
2026-09-29 6:04 ` Alexei Starovoitov
2026-09-29 16:40 ` Ihor Solodrai
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=20260924032804.E679E1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alexei.starovoitov@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=sashiko-reviews@lists.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 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.