Skip to content

LoongArch: BPF features and fixes

Hengqi Chen loongarch 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5LoongArch: BPF: Sign extend kfunc call argumentsarch/loongarch/net/bpf_jit.c arch/loongarch/net/bpf_jit.h+42 -03 replies
2/5LoongArch: BPF: Zero-extend bpf_tail_call() indexarch/loongarch/net/bpf_jit.c+2 -00 replies
3/5LoongArch: BPF: Use BPF prog pack allocatorarch/loongarch/net/bpf_jit.c arch/loongarch/net/bpf_jit.h+87 -380 replies
4/5LoongArch: BPF: Implement PROBE_MEM32 pseudo instructionsarch/loongarch/net/bpf_jit.c arch/loongarch/net/bpf_jit.h+66 -40 replies
5/5LoongArch: BPF: Implement bpf_addr_space_cast instructionarch/loongarch/net/bpf_jit.c arch/loongarch/net/bpf_jit.h+16 -00 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchTiezhu Yang
SeriesA-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] LoongArch: BPF features and fixes

This small set implement new features with 2 bug fixes for BPF.

* Patch 1 fixes a bug discovered while testing the BPF Arena feature.
Without this fix, the arena_htab test case which use the
bpf_arena_alloc_pages kfunc will trigger a kernel panic.
* Patch 2 fixes a subtle bug for tail call index, this can be verified
by the verifier_runtime_jit test case.
See the following two threads for background:
- https://lore.kernel.org/bpf/CAEyhmHTvj4cDRfu1FXSEXmdCqyWfs3ehw5gtB9qJCrThuUy2Kw@mail.gmail.com/
- https://lore.kernel.org/bpf/[email protected]/
* Patch 3 uses pack allocator for BPF programs (BPF trampoline already
use pack allocator, this make it complete), with this, no regression
on existing selftests
* Patch 4 & 5 implements basic support for BPF Arena, the following
test cases passed:
- arena_htab
- arena_list
- verifier_arena
- verifier_arena_large

Hengqi Chen (5):
LoongArch: BPF: Sign extend kfunc call arguments
LoongArch: BPF: Zero-extend bpf_tail_call() index
LoongArch: BPF: Use BPF prog pack allocator
LoongArch: BPF: Implement PROBE_MEM32 pseudo instructions
LoongArch: BPF: Implement bpf_addr_space_cast instruction

 arch/loongarch/net/bpf_jit.c | 225 ++++++++++++++++++++++++++++-------
 arch/loongarch/net/bpf_jit.h |  30 ++++-
 2 files changed, 213 insertions(+), 42 deletions(-)

--
2.43.5