From: Will Deacon <will@kernel•org>
To: Puranjay Mohan <puranjay@kernel•org>
Cc: bpf@vger•kernel.org, Yonghong Song <yonghong.song@linux•dev>,
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>,
Kumar Kartikeya Dwivedi <memxor@gmail•com>,
Song Liu <song@kernel•org>, Xu Kuohai <xukuohai@huaweicloud•com>,
Catalin Marinas <catalin.marinas@arm•com>,
linux-arm-kernel@lists•infradead.org
Subject: Re: [PATCH bpf-next v2 1/3] bpf, arm64: Map BPF_REG_0 to x8 instead of x7
Date: Thu, 28 May 2026 14:42:28 +0100 [thread overview]
Message-ID: <ahhGRE1efWfKsvZW@willie-the-truck> (raw)
In-Reply-To: <20260427234801.2104511-2-puranjay@kernel.org>
On Mon, Apr 27, 2026 at 04:47:58PM -0700, Puranjay Mohan wrote:
> Move the BPF return value register from x7 to x8, freeing x7 for use
> as an argument register. AAPCS64 designates x8 as the indirect result
> location register; it is caller-saved and not used for argument
> passing, making it a suitable home for BPF_REG_0.
>
> This is a prerequisite for stack argument support, which needs x5-x7
> to pass arguments 6-8 to native kfuncs following the AAPCS64 calling
> convention.
>
> Signed-off-by: Yonghong Song <yonghong.song@linux•dev>
> Signed-off-by: Puranjay Mohan <puranjay@kernel•org>
> ---
> arch/arm64/net/bpf_jit_comp.c | 4 ++--
> arch/arm64/net/bpf_timed_may_goto.S | 8 ++++----
> .../testing/selftests/bpf/progs/verifier_jit_inline.c | 2 +-
> tools/testing/selftests/bpf/progs/verifier_ldsx.c | 6 +++---
> .../selftests/bpf/progs/verifier_private_stack.c | 10 +++++-----
> 5 files changed, 15 insertions(+), 15 deletions(-)
Makes sense to me:
Acked-by: Will Deacon <will@kernel•org>
Will
next prev parent reply other threads:[~2026-05-28 13:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 23:47 [PATCH bpf-next v2 0/3] bpf, arm64: Support stack arguments Puranjay Mohan
2026-04-27 23:47 ` [PATCH bpf-next v2 1/3] bpf, arm64: Map BPF_REG_0 to x8 instead of x7 Puranjay Mohan
2026-05-28 13:42 ` Will Deacon [this message]
2026-04-27 23:47 ` [PATCH bpf-next v2 2/3] bpf, arm64: Add JIT support for stack arguments Puranjay Mohan
2026-05-28 13:43 ` Will Deacon
2026-05-28 14:23 ` Puranjay Mohan
2026-05-29 13:36 ` Will Deacon
2026-04-27 23:48 ` [PATCH bpf-next v2 3/3] selftests/bpf: Enable stack argument tests for arm64 Puranjay Mohan
2026-05-28 13:42 ` Will Deacon
2026-05-28 14:29 ` Puranjay Mohan
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=ahhGRE1efWfKsvZW@willie-the-truck \
--to=will@kernel$(echo .)org \
--cc=andrii@kernel$(echo .)org \
--cc=ast@kernel$(echo .)org \
--cc=bpf@vger$(echo .)kernel.org \
--cc=catalin.marinas@arm$(echo .)com \
--cc=daniel@iogearbox$(echo .)net \
--cc=eddyz87@gmail$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=martin.lau@linux$(echo .)dev \
--cc=memxor@gmail$(echo .)com \
--cc=puranjay@kernel$(echo .)org \
--cc=song@kernel$(echo .)org \
--cc=xukuohai@huaweicloud$(echo .)com \
--cc=yonghong.song@linux$(echo .)dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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