[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4Bzb_R56wAuD-Wgg7B5brT-dcsa+5sYynY+_CFzRwg+N5AA@mail.gmail.com>
Date: Fri, 15 Apr 2022 10:12:31 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Xu Kuohai <xukuohai@...wei.com>
Cc: bpf <bpf@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
open list <linux-kernel@...r.kernel.org>,
Networking <netdev@...r.kernel.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>,
Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...nel.org>,
Zi Shen Lim <zlim.lnx@...il.com>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
"David S . Miller" <davem@...emloft.net>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
David Ahern <dsahern@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
X86 ML <x86@...nel.org>, hpa@...or.com,
Shuah Khan <shuah@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Ard Biesheuvel <ardb@...nel.org>,
Pasha Tatashin <pasha.tatashin@...een.com>,
Peter Collingbourne <pcc@...gle.com>,
Daniel Kiss <daniel.kiss@....com>,
Sudeep Holla <sudeep.holla@....com>,
Steven Price <steven.price@....com>,
Marc Zyngier <maz@...nel.org>, Mark Brown <broonie@...nel.org>,
Kumar Kartikeya Dwivedi <memxor@...il.com>,
Delyan Kratunov <delyank@...com>
Subject: Re: [PATCH bpf-next v2 5/6] bpf, arm64: bpf trampoline for arm64
On Thu, Apr 14, 2022 at 9:10 AM Xu Kuohai <xukuohai@...wei.com> wrote:
>
> Add bpf trampoline support for arm64. Most of the logic is the same as
> x86.
>
> fentry before bpf trampoline hooked:
> mov x9, x30
> nop
>
> fentry after bpf trampoline hooked:
> mov x9, x30
> bl <bpf_trampoline>
>
> Tested on qemu, result:
> #55 fentry_fexit:OK
> #56 fentry_test:OK
> #58 fexit_sleep:OK
> #59 fexit_stress:OK
> #60 fexit_test:OK
> #67 get_func_args_test:OK
> #68 get_func_ip_test:OK
> #101 modify_return:OK
>
> Signed-off-by: Xu Kuohai <xukuohai@...wei.com>
> Acked-by: Song Liu <songliubraving@...com>
> ---
Can you please also take a look at [0], which is an ongoing work to
add support for BPF cookie to BPF trampoline-based BPF programs. It's
very close to being done, so it would be good if you can implement
that at the same time.
[0] https://patchwork.kernel.org/project/netdevbpf/patch/20220412165555.4146407-4-kuifeng@fb.com/
> arch/arm64/net/bpf_jit.h | 14 +-
> arch/arm64/net/bpf_jit_comp.c | 338 +++++++++++++++++++++++++++++++++-
> 2 files changed, 348 insertions(+), 4 deletions(-)
>
[...]
Powered by blists - more mailing lists