Skip to content

bpf, arm64: support up to 12 arguments #8987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

kernel-patches-daemon-bpf[bot]
Copy link

Pull request for series with
subject: bpf, arm64: support up to 12 arguments
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=965353

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 25b6d5d
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=965353
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 4e2e684
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=965353
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: d90f0bc
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=965353
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 5ead949
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=965353
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 6888a03
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=965353
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 8259eb0
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=965353
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: bfccacd
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=965353
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 079e5c5
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=965353
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 079e5c5
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=966617
version: 3

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: db22b13
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=966617
version: 3

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 1ae7a84
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=966617
version: 3

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 86bc9c7
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=966617
version: 3

@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot force-pushed the series/952634=>bpf-next branch from e3be4c2 to cea2447 Compare May 27, 2025 17:48
@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: d496557
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=966617
version: 3

Xu Kuohai and others added 2 commits May 27, 2025 10:54
Currently ARM64 bpf trampoline supports up to 8 function arguments.
According to the statistics from commit
473e315 ("bpf, x86: allow function arguments up to 12 for TRACING"),
there are about 200 functions accept 9 to 12 arguments, so adding support
for up to 12 function arguments.

Due to bpf only supporting function arguments up to 16 bytes, according to
AAPCS64, starting from the first argument, each argument is first
attempted to be loaded to 1 or 2 smallest registers from x0-x7, if there
are no enough registers to hold the entire argument, then all remaining
arguments starting from this one are pushed to the stack for passing.
There are some non-trivial cases for which it is not possible to
correctly read arguments from/write arguments to the stack: for example
struct variables may have custom packing/alignment attributes that are
invisible in BTF info. Such cases are denied for now to make sure not to
read incorrect values.

Signed-off-by: Xu Kuohai <[email protected]>
Co-developed-by: Alexis Lothoré (eBPF Foundation) <[email protected]>
Signed-off-by: Alexis Lothoré (eBPF Foundation) <[email protected]>
Now that support for up to 12 args is enabled for tracing programs on
ARM64, enable the existing tests for this feature on this architecture.

Signed-off-by: Alexis Lothoré (eBPF Foundation) <[email protected]>
@kernel-patches-daemon-bpf
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=966617 irrelevant now. Closing PR.

@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot deleted the series/952634=>bpf-next branch May 27, 2025 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant