Skip to content

powerpc/bpf: Some updates and cleanups

Naveen N. Rao bpf linuxppc-dev 1 version Applied

Status from this message: Applied to powerpc/next.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest17 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/17powerpc/bpf: Skip branch range validation during first passarch/powerpc/net/bpf_jit.h+2 -20 replies
2/17powerpc/bpf: Emit a single branch instruction for known short branch rangesarch/powerpc/net/bpf_jit_comp32.c arch/powerpc/net/bpf_jit_comp64.c+8 -80 replies
3/17powerpc/bpf: Handle large branch ranges with BPF_EXITarch/powerpc/net/bpf_jit.h arch/powerpc/net/bpf_jit_comp.c arch/powerpc/net/bpf_jit_comp32.c +1 more+33 -50 replies
4/17powerpc64/bpf: Do not save/restore LR on each call to bpf_stf_barrier()arch/powerpc/net/bpf_jit_comp64.c+1 -20 replies
5/17powerpc64/bpf: Use r12 for constant blindingarch/powerpc/net/bpf_jit64.h+1 -10 replies
6/17powerpc64: Set PPC64_ELF_ABI_v[1|2] macros to 1arch/powerpc/include/asm/types.h+2 -20 replies
7/17powerpc64/bpf elfv2: Setup kernel TOC in r2 on entryarch/powerpc/net/bpf_jit_comp64.c+8 -80 replies
8/17powerpc64/bpf elfv1: Do not load TOC before calling functionsarch/powerpc/net/bpf_jit.h arch/powerpc/net/bpf_jit_comp.c arch/powerpc/net/bpf_jit_comp32.c +1 more+30 -230 replies
9/17powerpc64/bpf: Optimize instruction sequence used for function callsarch/powerpc/net/bpf_jit_comp64.c+13 -170 replies
10/17powerpc/bpf: Rename PPC_BL_ABS() to PPC_BL()arch/powerpc/net/bpf_jit.h arch/powerpc/net/bpf_jit_comp32.c+4 -40 replies
11/17powerpc64/bpf: Convert some of the uses of PPC_BPF_[LL|STL] to PPC_BPF_[LD|STD]arch/powerpc/net/bpf_jit_comp64.c+11 -110 replies
12/17powerpc64/bpf: Get rid of PPC_BPF_[LL|STL|STLU] macrosarch/powerpc/net/bpf_jit64.h arch/powerpc/net/bpf_jit_comp64.c+15 -280 replies
13/17powerpc/bpf: Cleanup bpf_jit.harch/powerpc/net/bpf_jit.h arch/powerpc/net/bpf_jit_comp32.c+3 -90 replies
14/17powerpc/bpf: Move bpf_jit64.h into bpf_jit_comp64.carch/powerpc/net/bpf_jit64.h arch/powerpc/net/bpf_jit_comp64.c+53 -700 replies
15/17powerpc/bpf: Use _Rn macros for GPRsarch/powerpc/net/bpf_jit_comp32.c arch/powerpc/net/bpf_jit_comp64.c+49 -490 replies
16/17powerpc64/bpf: Store temp registers' bpf to ppc mappingarch/powerpc/net/bpf_jit_comp64.c+86 -1110 replies
17/17powerpc/bpf: Simplify bpf_to_ppc() and adopt it for powerpc64arch/powerpc/net/bpf_jit.h arch/powerpc/net/bpf_jit_comp.c arch/powerpc/net/bpf_jit_comp32.c +1 more+98 -1040 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH powerpc/next 00/17] powerpc/bpf: Some updates and cleanups

This is a follow-up series with the pending patches from:
https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=279602&state=*

Patches 1-5 and 8 are unchanged. Patch 6 is new and patch 7 has changes based on discussion from the last series. Patch 9 has a small change to not skip the toc load for elf v2.

Patches 10-17 are new to this series and are largely some cleanups to the bpf code on powerpc.

- Naveen

Jordan Niethe (1):
powerpc64/bpf: Store temp registers' bpf to ppc mapping

Naveen N. Rao (16):
powerpc/bpf: Skip branch range validation during first pass powerpc/bpf: Emit a single branch instruction for known short branch
ranges
powerpc/bpf: Handle large branch ranges with BPF_EXIT powerpc64/bpf: Do not save/restore LR on each call to
bpf_stf_barrier()
powerpc64/bpf: Use r12 for constant blinding
powerpc64: Set PPC64_ELF_ABI_v[1|2] macros to 1 powerpc64/bpf elfv2: Setup kernel TOC in r2 on entry powerpc64/bpf elfv1: Do not load TOC before calling functions powerpc64/bpf: Optimize instruction sequence used for function calls powerpc/bpf: Rename PPC_BL_ABS() to PPC_BL() powerpc64/bpf: Convert some of the uses of PPC_BPF_[LL|STL] to

    PPC_BPF_[LD|STD]

powerpc64/bpf: Get rid of PPC_BPF_[LL|STL|STLU] macros powerpc/bpf: Cleanup bpf_jit.h
powerpc/bpf: Move bpf_jit64.h into bpf_jit_comp64.c powerpc/bpf: Use _Rn macros for GPRs
powerpc/bpf: Simplify bpf_to_ppc() and adopt it for powerpc64

 arch/powerpc/include/asm/types.h  |   4 +-
 arch/powerpc/net/bpf_jit.h        |  35 +--
 arch/powerpc/net/bpf_jit64.h      |  91 ------
 arch/powerpc/net/bpf_jit_comp.c   |  34 ++-
 arch/powerpc/net/bpf_jit_comp32.c | 113 ++++----
 arch/powerpc/net/bpf_jit_comp64.c | 440 ++++++++++++++++--------------
 6 files changed, 340 insertions(+), 377 deletions(-)
 delete mode 100644 arch/powerpc/net/bpf_jit64.h

base-commit: 1b43a74f255c5c00db25a5fedfd75ca0dc029022

Signature · 1 line
2.35.1