From: Puranjay Mohan <puranjay@kernel.org>
To: bpf@vger.kernel.org
Cc: Puranjay Mohan <puranjay@kernel.org>,
Puranjay Mohan <puranjay12@gmail.com>,
Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <martin.lau@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>,
Xu Kuohai <xukuohai@huaweicloud.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
kernel-team@meta.com
Subject: [PATCH bpf-next v2 0/3] bpf: arm64: Indirect jumps
Date: Mon, 17 Nov 2025 13:07:28 +0000 [thread overview]
Message-ID: <20251117130732.11107-1-puranjay@kernel.org> (raw)
Changes in v1->v2:
v1: https://lore.kernel.org/all/20251117004656.33292-1-puranjay@kernel.org/
- Dropped patch 3 that was ignoring relocations for .jumptables. LLVM
has been fixed to not emit relocations for .jumptables, so this patch
is not needed.
- Added Reviewed-by: Anton Protopopov <a.s.protopopov@gmail.com>
This set adds the support of indirect jumps to the arm64 JIT. It
involves calling bpf_prog_update_insn_ptrs() to support instructions
array map. The second piece is supporting BPF_JMP|BPF_X|BPF_JA, SRC=0,
DST=Rx, off=0, imm=0 instruction that is trivial to implement on arm64.
The final patch enables selftests on arm64:
[root@localhost bpf]# ./test_progs-cpuv4 -a "*gotox*"
#20/1 bpf_gotox/one-switch:OK
#20/2 bpf_gotox/one-switch-non-zero-sec-offset:OK
#20/3 bpf_gotox/two-switches:OK
#20/4 bpf_gotox/big-jump-table:OK
#20/5 bpf_gotox/static-global:OK
#20/6 bpf_gotox/nonstatic-global:OK
#20/7 bpf_gotox/other-sec:OK
#20/8 bpf_gotox/static-global-other-sec:OK
#20/9 bpf_gotox/nonstatic-global-other-sec:OK
#20/10 bpf_gotox/one-jump-two-maps:OK
#20/11 bpf_gotox/one-map-two-jumps:OK
#20 bpf_gotox:OK
#537/1 verifier_gotox/jump_table_ok:OK
#537/2 verifier_gotox/jump_table_reserved_field_src_reg:OK
#537/3 verifier_gotox/jump_table_reserved_field_non_zero_off:OK
#537/4 verifier_gotox/jump_table_reserved_field_non_zero_imm:OK
#537/5 verifier_gotox/jump_table_no_jump_table:OK
#537/6 verifier_gotox/jump_table_incorrect_dst_reg_type:OK
#537/7 verifier_gotox/jump_table_invalid_read_size_u32:OK
#537/8 verifier_gotox/jump_table_invalid_read_size_u16:OK
#537/9 verifier_gotox/jump_table_invalid_read_size_u8:OK
#537/10 verifier_gotox/jump_table_misaligned_access:OK
#537/11 verifier_gotox/jump_table_invalid_mem_acceess_pos:OK
#537/12 verifier_gotox/jump_table_invalid_mem_acceess_neg:OK
#537/13 verifier_gotox/jump_table_add_sub_ok:OK
#537/14 verifier_gotox/jump_table_no_writes:OK
#537/15 verifier_gotox/jump_table_use_reg_r0:OK
#537/16 verifier_gotox/jump_table_use_reg_r1:OK
#537/17 verifier_gotox/jump_table_use_reg_r2:OK
#537/18 verifier_gotox/jump_table_use_reg_r3:OK
#537/19 verifier_gotox/jump_table_use_reg_r4:OK
#537/20 verifier_gotox/jump_table_use_reg_r5:OK
#537/21 verifier_gotox/jump_table_use_reg_r6:OK
#537/22 verifier_gotox/jump_table_use_reg_r7:OK
#537/23 verifier_gotox/jump_table_use_reg_r8:OK
#537/24 verifier_gotox/jump_table_use_reg_r9:OK
#537/25 verifier_gotox/jump_table_outside_subprog:OK
#537/26 verifier_gotox/jump_table_contains_non_unique_values:OK
#537 verifier_gotox:OK
Summary: 2/37 PASSED, 0 SKIPPED, 0 FAILED
Puranjay Mohan (3):
bpf: arm64: Add support for instructions array
bpf: arm64: Add support for indirect jumps
selftests: bpf: Enable gotox tests from arm64
arch/arm64/net/bpf_jit_comp.c | 11 +++++++++++
tools/testing/selftests/bpf/progs/verifier_gotox.c | 4 ++--
2 files changed, 13 insertions(+), 2 deletions(-)
--
2.47.1
next reply other threads:[~2025-11-17 13:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 13:07 Puranjay Mohan [this message]
2025-11-17 13:07 ` [PATCH bpf-next v2 1/3] bpf: arm64: Add support for instructions array Puranjay Mohan
2025-11-18 12:43 ` Xu Kuohai
2025-11-17 13:07 ` [PATCH bpf-next v2 2/3] bpf: arm64: Add support for indirect jumps Puranjay Mohan
2025-11-18 12:43 ` Xu Kuohai
2025-11-17 13:07 ` [PATCH bpf-next v2 3/3] selftests: bpf: Enable gotox tests from arm64 Puranjay Mohan
2025-11-22 0:53 ` [PATCH bpf-next v2 0/3] bpf: arm64: Indirect jumps patchwork-bot+netdevbpf
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=20251117130732.11107-1-puranjay@kernel.org \
--to=puranjay@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=catalin.marinas@arm.com \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=kernel-team@meta.com \
--cc=martin.lau@kernel.org \
--cc=puranjay12@gmail.com \
--cc=will@kernel.org \
--cc=xukuohai@huaweicloud.com \
/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