From: Daniel Borkmann <daniel@iogearbox.net>
To: Song Liu <song@kernel.org>, bpf@vger.kernel.org
Cc: ast@kernel.org, andrii@kernel.org, martin.lau@kernel.org,
kernel-team@meta.com, Ilya Leoshkevich <iii@linux.ibm.com>,
bjorn@kernel.org, xukuohai@huawei.com, pulehui@huawei.com
Subject: Re: [PATCH v4 bpf-next 5/7] bpf: Add arch_bpf_trampoline_size()
Date: Tue, 24 Oct 2023 16:50:40 +0200 [thread overview]
Message-ID: <11402dc3-ea76-8d7a-e5c2-83401aeba4ac@iogearbox.net> (raw)
In-Reply-To: <20231018180336.1696131-6-song@kernel.org>
On 10/18/23 8:03 PM, Song Liu wrote:
> This helper will be used to calculate the size of the trampoline before
> allocating the memory.
>
> arch_prepare_bpf_trampoline() for arm64 and riscv64 can use
> arch_bpf_trampoline_size() to check the trampoline fits in the image.
>
> OTOH, arch_prepare_bpf_trampoline() for s390 has to call the JIT process
> twice, so it cannot use arch_bpf_trampoline_size().
>
> Signed-off-by: Song Liu <song@kernel.org>
> Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
> Tested-by: Ilya Leoshkevich <iii@linux.ibm.com> # on s390x
> ---
> arch/arm64/net/bpf_jit_comp.c | 56 ++++++++++++++++++++++++---------
> arch/riscv/net/bpf_jit_comp64.c | 22 ++++++++++---
> arch/s390/net/bpf_jit_comp.c | 56 ++++++++++++++++++++-------------
> arch/x86/net/bpf_jit_comp.c | 37 +++++++++++++++++++---
> include/linux/bpf.h | 2 ++
> kernel/bpf/trampoline.c | 6 ++++
> 6 files changed, 133 insertions(+), 46 deletions(-)
Readding Bjorn, Xu and Pu to Cc given they reviewed prior versions, would be nice
to get some more arch Acks in.
Thanks,
Daniel
next prev parent reply other threads:[~2023-10-24 14:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-18 18:03 [PATCH v4 bpf-next 0/7] Allocate bpf trampoline on bpf_prog_pack Song Liu
2023-10-18 18:03 ` [PATCH v4 bpf-next 1/7] bpf: Let bpf_prog_pack_free handle any pointer Song Liu
2023-10-18 18:03 ` [PATCH v4 bpf-next 2/7] bpf: Adjust argument names of arch_prepare_bpf_trampoline() Song Liu
2023-10-18 18:03 ` [PATCH v4 bpf-next 3/7] bpf: Add helpers for trampoline image management Song Liu
2023-10-24 14:45 ` Daniel Borkmann
2023-10-24 15:45 ` Song Liu
2023-10-18 18:03 ` [PATCH v4 bpf-next 4/7] bpf, x86: Adjust arch_prepare_bpf_trampoline return value Song Liu
2023-10-18 18:03 ` [PATCH v4 bpf-next 5/7] bpf: Add arch_bpf_trampoline_size() Song Liu
2023-10-24 14:50 ` Daniel Borkmann [this message]
2023-10-18 18:03 ` [PATCH v4 bpf-next 6/7] bpf: Use arch_bpf_trampoline_size Song Liu
2023-10-24 21:01 ` Jiri Olsa
2023-10-24 21:08 ` Song Liu
2023-10-24 21:30 ` Jiri Olsa
2023-10-24 22:16 ` Song Liu
2023-10-18 18:03 ` [PATCH v4 bpf-next 7/7] x86, bpf: Use bpf_prog_pack for bpf trampoline Song Liu
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=11402dc3-ea76-8d7a-e5c2-83401aeba4ac@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bjorn@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=iii@linux.ibm.com \
--cc=kernel-team@meta.com \
--cc=martin.lau@kernel.org \
--cc=pulehui@huawei.com \
--cc=song@kernel.org \
--cc=xukuohai@huawei.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;
as well as URLs for NNTP newsgroup(s).