From: "Alexis Lothoré" <alexis.lothore@bootlin.com>
To: Puranjay Mohan <puranjay@kernel.org>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>,
Puranjay Mohan <puranjay12@gmail.com>,
Xu Kuohai <xukuohai@huaweicloud.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, Mykola Lysenko <mykolal@fb.com>,
Shuah Khan <shuah@kernel.org>,
bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
Florent Revest <revest@chromium.org>,
Xu Kuohai <xukuohai@huaweicloud.com>,
Bastien Curutchet <bastien.curutchet@bootlin.com>
Subject: Re: [PATCH bpf-next v2] arm64, bpf: Add 12-argument support for bpf trampoline
Date: Fri, 21 Feb 2025 17:58:18 +0100 [thread overview]
Message-ID: <b41cb993-3cdf-4cfb-a131-14c1a66c8824@bootlin.com> (raw)
In-Reply-To: <20240705125336.46820-1-puranjay@kernel.org>
Hello everyone,
On 7/5/24 14:53, Puranjay Mohan wrote:
> The arm64 bpf JIT currently supports attaching the trampoline to
> functions with <= 8 arguments. This is because up to 8 arguments can be
> passed in registers r0-r7. If there are more than 8 arguments then the
> 9th and later arguments are passed on the stack, with SP pointing to the
> first stacked argument. See aapcs64[1] for more details.
>
> If the 8th argument is a structure of size > 8B, then it is passed fully
> on stack and r7 is not used for passing any argument. If there is a 9th
> argument, it will be passed on the stack, even though r7 is available.
>
> Add the support of storing and restoring arguments passed on the stack
> to the arm64 bpf trampoline. This will allow attaching the trampoline to
> functions that take up to 12 arguments.
>
> [1] https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#parameter-passing
>
> Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
[...]
+cc Xu Kuohai + cc Florent Revest, who are involved in [0]
We at Bootlin are currently working on improving eBPF selftests coverage and
aligning ARM64 support with other platforms. For this second topic, one
remaining point is the support for 12 arguments in bpf trampolines. It looks
like a big part of the work has been done and submitted through two different
versions, the first one from Xu ([0]), and this one from Puranjay ([1]). There
is still some rework needed in both versions to properly handle some alignment
constraints.
@Puranjay @Xu are you (or anyone else) actively working on those series (I kind
of understand that you both agreed that Puranjay was continuing this work) ? If
so, if there a way to assist you on this topic ? If not, can we take and revive
your work to try to handle the missing points and make this feature integrated ?
Thanks,
Alexis
[0] https://lore.kernel.org/bpf/20230917150752.69612-1-xukuohai@huaweicloud.com/
[1] https://lore.kernel.org/bpf/20240705125336.46820-1-puranjay@kernel.org/
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2025-02-21 16:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-05 12:53 [PATCH bpf-next v2] arm64, bpf: Add 12-argument support for bpf trampoline Puranjay Mohan
2024-07-06 9:28 ` Xu Kuohai
2024-07-08 9:00 ` Puranjay Mohan
2024-07-08 9:33 ` Xu Kuohai
2025-02-21 16:58 ` Alexis Lothoré [this message]
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=b41cb993-3cdf-4cfb-a131-14c1a66c8824@bootlin.com \
--to=alexis.lothore@bootlin.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bastien.curutchet@bootlin.com \
--cc=bpf@vger.kernel.org \
--cc=catalin.marinas@arm.com \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=mykolal@fb.com \
--cc=puranjay12@gmail.com \
--cc=puranjay@kernel.org \
--cc=revest@chromium.org \
--cc=sdf@google.com \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=will@kernel.org \
--cc=xukuohai@huaweicloud.com \
--cc=yonghong.song@linux.dev \
/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