All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] bpf, arm64: relax constraint in BPF JIT compiler
@ 2025-07-09  8:36 Alexis Lothoré (eBPF Foundation)
  2025-07-09  8:36 ` [PATCH 1/2] bpf, arm64: remove structs on stack constraint Alexis Lothoré (eBPF Foundation)
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Alexis Lothoré (eBPF Foundation) @ 2025-07-09  8:36 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, Shuah Khan
  Cc: ebpf, Thomas Petazzoni, Bastien Curutchet, Ihor Solodrai, bpf,
	linux-arm-kernel, linux-kernel, linux-kselftest,
	Alexis Lothoré (eBPF Foundation)

Hello,
this series follows up on the one introducing 9+ args for tracing
programs [1]. It has been observed with this series that there are cases
for which we can not identify accurately the location of the target
function arguments to prepare correctly the corresponding BPF
trampoline. This is the case for example if:
- the function consumes a struct variable _by value_
- it is passed on the stack (no more register available for it)
- it has some __packed__ or __aligned(X)__ attribute

As a consequence, a small restrictive check has been added to the ARM64
side, highlighting that other arch supporting 9+ args in BPF trampolines
are already suffering from the same issue.  After a bit of discussions
and attempts, the chosen solution is, rather than applying the same
constraint to all JIT compilers, to prevent such function from being
encoded at all in BTF info([2]). As the pahole side is closed to be
integrated, we can now remove the restrictive check from kernel side.
 
[1] https://lore.kernel.org/bpf/20250527-many_args_arm64-v3-0-3faf7bb8e4a2@bootlin.com/
[2] https://lore.kernel.org/bpf/20250707-btf_skip_structs_on_stack-v3-0-29569e086c12@bootlin.com/

Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
---
Alexis Lothoré (eBPF Foundation) (2):
      bpf, arm64: remove structs on stack constraint
      selftests/bpf: enable tracing_struct tests for arm64

 arch/arm64/net/bpf_jit_comp.c                | 5 -----
 tools/testing/selftests/bpf/DENYLIST.aarch64 | 1 -
 2 files changed, 6 deletions(-)
---
base-commit: 8da1e37fc84868b50ba6a7cdf082aa3b0d11e006
change-id: 20250708-arm64_relax_jit_comp-e8889647d8d2

Best regards,
-- 
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


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

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

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-09  8:36 [PATCH 0/2] bpf, arm64: relax constraint in BPF JIT compiler Alexis Lothoré (eBPF Foundation)
2025-07-09  8:36 ` [PATCH 1/2] bpf, arm64: remove structs on stack constraint Alexis Lothoré (eBPF Foundation)
2025-07-15 13:32   ` Will Deacon
2025-07-15 14:02     ` Alexis Lothoré
2025-07-15 14:31       ` Will Deacon
2025-07-15 15:40         ` Alexei Starovoitov
2025-07-16  7:37           ` Alexis Lothoré
2025-07-09  8:36 ` [PATCH 2/2] selftests/bpf: enable tracing_struct tests for arm64 Alexis Lothoré (eBPF Foundation)
2025-07-17  1:30 ` [PATCH 0/2] bpf, arm64: relax constraint in BPF JIT compiler patchwork-bot+netdevbpf

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.