From: David Miller <davem@davemloft.net>
To: yang.shi@linaro.org
Cc: ast@kernel.org, daniel@iogearbox.net, catalin.marinas@arm.com,
will.deacon@arm.com, zlim.lnx@gmail.com, xi.wang@gmail.com,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linaro-kernel@lists.linaro.org
Subject: Re: [PATCH V4 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS
Date: Tue, 17 Nov 2015 14:44:58 -0500 (EST) [thread overview]
Message-ID: <20151117.144458.1305922349920062634.davem@davemloft.net> (raw)
In-Reply-To: <1447713335-29707-1-git-send-email-yang.shi@linaro.org>
From: Yang Shi <yang.shi@linaro.org>
Date: Mon, 16 Nov 2015 14:35:35 -0800
> Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP
> in prologue in order to get the correct stack backtrace.
>
> However, ARM64 JIT used FP (x29) as eBPF fp register, FP is subjected to
> change during function call so it may cause the BPF prog stack base address
> change too.
>
> Use x25 to replace FP as BPF stack base register (fp). Since x25 is callee
> saved register, so it will keep intact during function call.
> It is initialized in BPF prog prologue when BPF prog is started to run
> everytime. Save and restore x25/x26 in BPF prologue and epilogue to keep
> them intact for the outside of BPF. Actually, x26 is unnecessary, but SP
> requires 16 bytes alignment.
>
> So, the BPF stack layout looks like:
...
> Signed-off-by: Yang Shi <yang.shi@linaro.org>
Applied, thank you.
prev parent reply other threads:[~2015-11-17 19:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CABg9mct-hnEhvT6y9ZgCC8nMan5YbmByQa_ViUWzeea6ToqG4A@mail.gmail.com>
2015-11-13 18:09 ` [PATCH V3 " Yang Shi
2015-11-14 2:39 ` Z Lim
2015-11-16 19:48 ` Shi, Yang
2015-11-16 22:35 ` [PATCH V4 " Yang Shi
2015-11-17 4:37 ` Z Lim
2015-11-17 4:41 ` Alexei Starovoitov
2015-11-17 4:43 ` Shi, Yang
2015-11-17 16:51 ` David Miller
2015-11-17 19:44 ` David Miller [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=20151117.144458.1305922349920062634.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ast@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=daniel@iogearbox.net \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=will.deacon@arm.com \
--cc=xi.wang@gmail.com \
--cc=yang.shi@linaro.org \
--cc=zlim.lnx@gmail.com \
/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
all inboxes | Powered by JetHome®