-
Notifications
You must be signed in to change notification settings - Fork 130
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
Conversation
Upstream branch: 25b6d5d |
f3a4188
to
f10d83e
Compare
Upstream branch: 4e2e684 |
c4b31ca
to
1b3a3a0
Compare
f10d83e
to
9857a0f
Compare
Upstream branch: d90f0bc |
1b3a3a0
to
9d44e71
Compare
9857a0f
to
b93b30b
Compare
Upstream branch: 5ead949 |
9d44e71
to
6008adf
Compare
b93b30b
to
f4bae1b
Compare
Upstream branch: 6888a03 |
6008adf
to
a43c9f4
Compare
f4bae1b
to
b8dcdbb
Compare
Upstream branch: 8259eb0 |
a43c9f4
to
4d170f7
Compare
b8dcdbb
to
e85324d
Compare
Upstream branch: bfccacd |
4d170f7
to
e5082ef
Compare
e85324d
to
61c8df2
Compare
Upstream branch: 079e5c5 |
e5082ef
to
34ac38b
Compare
Upstream branch: 079e5c5 |
34ac38b
to
9f0ae77
Compare
61c8df2
to
708d4b4
Compare
Upstream branch: db22b13 |
9f0ae77
to
89bc926
Compare
708d4b4
to
6c5a4cd
Compare
Upstream branch: 1ae7a84 |
89bc926
to
e3be4c2
Compare
6c5a4cd
to
1918227
Compare
Upstream branch: 86bc9c7 |
e3be4c2
to
cea2447
Compare
1918227
to
3777056
Compare
Upstream branch: d496557 |
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]>
cea2447
to
58871c9
Compare
3777056
to
7f76eaa
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=966617 irrelevant now. Closing PR. |
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