bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/3] bpf: Private stack support for arm64 JIT
@ 2025-07-24 12:02 Puranjay Mohan
  2025-07-24 12:02 ` [PATCH bpf-next v2 1/3] bpf: move bpf_jit_get_prog_name() to core.c Puranjay Mohan
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Puranjay Mohan @ 2025-07-24 12:02 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	Puranjay Mohan, Xu Kuohai, Catalin Marinas, Will Deacon,
	Mykola Lysenko, bpf

Changes in v1->v2:
v1: https://lore.kernel.org/all/20250722173254.3879-1-puranjay@kernel.org/
- Divided the patch into 3 patches (Yonghong)
- Fixed a warning in what is now the second patch (kernel test robot)

This set enables private stack in the arm64 JIT. The Jited programs use
access the stack with the BPF FP (arm64 R25) and SP (arm64 SP). When
using the private stack, BPF FP (arm64 R25) is set to point at the top
of the private stack and SP is replaced with arm64 R27 and it points at
the bottom of private stack.

All relevant selftests are enabled in the 3rd patch and are passing for
arm64.

Note: This needs the fix in [1] to work properly.
[1] https://lore.kernel.org/all/20250722133410.54161-2-puranjay@kernel.org/

Puranjay Mohan (3):
  bpf: move bpf_jit_get_prog_name() to core.c
  bpf, arm64: JIT support for private stack
  selftests/bpf: enable private stack tests for arm64

 arch/arm64/net/bpf_jit_comp.c                 | 133 ++++++++++++++++--
 arch/x86/net/bpf_jit_comp.c                   |   9 +-
 include/linux/filter.h                        |   2 +
 kernel/bpf/core.c                             |   7 +
 .../bpf/progs/struct_ops_private_stack.c      |   2 +-
 .../bpf/progs/struct_ops_private_stack_fail.c |   2 +-
 .../progs/struct_ops_private_stack_recur.c    |   2 +-
 .../bpf/progs/verifier_private_stack.c        |  89 +++++++++++-
 8 files changed, 222 insertions(+), 24 deletions(-)

-- 
2.47.3


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-07-26 19:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-24 12:02 [PATCH bpf-next v2 0/3] bpf: Private stack support for arm64 JIT Puranjay Mohan
2025-07-24 12:02 ` [PATCH bpf-next v2 1/3] bpf: move bpf_jit_get_prog_name() to core.c Puranjay Mohan
2025-07-24 16:01   ` Yonghong Song
2025-07-24 12:02 ` [PATCH bpf-next v2 2/3] bpf, arm64: JIT support for private stack Puranjay Mohan
2025-07-24 16:58   ` Yonghong Song
2025-07-24 12:02 ` [PATCH bpf-next v2 3/3] selftests/bpf: enable private stack tests for arm64 Puranjay Mohan
2025-07-24 17:03   ` Yonghong Song
2025-07-26 19:30 ` [PATCH bpf-next v2 0/3] bpf: Private stack support for arm64 JIT patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).