From: "Björn Töpel" <bjorn@kernel.org>
To: Pu Lehui <pulehui@huaweicloud.com>,
bpf@vger.kernel.org, linux-riscv@lists.infradead.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Palmer Dabbelt <palmer@rivosinc.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>, Yonghong Song <yhs@fb.com>,
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>, Palmer Dabbelt <palmer@dabbelt.com>,
Conor Dooley <conor.dooley@microchip.com>,
Guo Ren <guoren@kernel.org>, Luke Nelson <luke.r.nels@gmail.com>,
Xi Wang <xi.wang@gmail.com>, Pu Lehui <pulehui@huawei.com>,
Pu Lehui <pulehui@huaweicloud.com>
Subject: Re: [PATCH bpf-next v1 0/4] Support bpf trampoline for RV64
Date: Thu, 16 Feb 2023 10:56:49 +0100 [thread overview]
Message-ID: <8735763pcu.fsf@all.your.base.are.belong.to.us> (raw)
In-Reply-To: <20230215135205.1411105-1-pulehui@huaweicloud.com>
Pu Lehui <pulehui@huaweicloud.com> writes:
> BPF trampoline is the critical infrastructure of the bpf
> subsystem, acting as a mediator between kernel functions
> and BPF programs. Numerous important features, such as
> using ebpf program for zero overhead kernel introspection,
> rely on this key component. We can't wait to support bpf
> trampoline on RV64. Since RV64 does not support ftrace
> direct call yet, the current RV64 bpf trampoline is only
> used in bpf context.
>
> As most of riscv cpu support unaligned memory accesses,
> we temporarily use patch [1] to facilitate testing. The
> test results are as follow, and test_verifier with no
> new failure ceses.
>
> - fexit_bpf2bpf:OK
> - dummy_st_ops:OK
> - xdp_bpf2bpf:OK
>
> [1] https://lore.kernel.org/linux-riscv/20210916130855.4054926-2-chenhuang5@huawei.com/
>
> v1:
> - Remove the logic of bpf_arch_text_poke supported for
> kernel functions. (Kuohai and Björn)
> - Extend patch_text for multiple instructions. (Björn)
> - Fix OOB issue when image too big. (Björn)
This series is ready to go in as is.
@Palmer I'd like to take this series via the bpf-next tree (as usual),
but note that there are some non-BPF changes as well, related to text
poking.
@Lehui I'd like to see two follow-up patches:
1. Enable kfunc for RV64, by adding:
| bool bpf_jit_supports_kfunc_call(void)
| {
| return true;
| }
2. Remove the checkpatch warning on patch 4:
| WARNING: kfree(NULL) is safe and this check is probably not required
| #313: FILE: arch/riscv/net/bpf_jit_comp64.c:984:
| + if (branches_off)
| + kfree(branches_off);
For the series:
Tested-by: Björn Töpel <bjorn@rivosinc.com>
Acked-by: Björn Töpel <bjorn@rivosinc.com>
next prev parent reply other threads:[~2023-02-16 9:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-15 13:52 [PATCH bpf-next v1 0/4] Support bpf trampoline for RV64 Pu Lehui
2023-02-15 13:52 ` [PATCH bpf-next v1 1/4] riscv: Extend patch_text for multiple instructions Pu Lehui
2023-02-15 22:37 ` Conor Dooley
2023-02-16 1:18 ` Pu Lehui
2023-02-15 13:52 ` [PATCH bpf-next v1 2/4] riscv, bpf: Factor out emit_call for kernel and bpf context Pu Lehui
2023-02-15 13:52 ` [PATCH bpf-next v1 3/4] riscv, bpf: Add bpf_arch_text_poke support for RV64 Pu Lehui
2023-02-15 13:52 ` [PATCH bpf-next v1 4/4] riscv, bpf: Add bpf trampoline " Pu Lehui
2023-02-15 14:45 ` [PATCH bpf-next v1 0/4] Support bpf trampoline " Björn Töpel
2023-02-16 1:23 ` Pu Lehui
2023-02-16 9:56 ` Björn Töpel [this message]
2023-02-17 20:49 ` Daniel Borkmann
2023-02-18 1:30 ` Pu Lehui
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=8735763pcu.fsf@all.your.base.are.belong.to.us \
--to=bjorn@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=conor.dooley@microchip.com \
--cc=daniel@iogearbox.net \
--cc=guoren@kernel.org \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=luke.r.nels@gmail.com \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=palmer@dabbelt.com \
--cc=palmer@rivosinc.com \
--cc=pulehui@huawei.com \
--cc=pulehui@huaweicloud.com \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=xi.wang@gmail.com \
--cc=yhs@fb.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