Skip to content

powerpc/bpf: Some fixes and updates

Naveen N. Rao bpf linuxppc-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 19 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13bpf: Guard against accessing NULL pt_regs in bpf_get_task_stack()kernel/bpf/stackmap.c+3 -23 replies
2/13powerpc32/bpf: Fix codegen for bpf-to-bpf callsarch/powerpc/net/bpf_jit_comp32.c+3 -02 replies
3/13powerpc/bpf: Update ldimm64 instructions during extra passarch/powerpc/net/bpf_jit_comp.c arch/powerpc/net/bpf_jit_comp32.c arch/powerpc/net/bpf_jit_comp64.c+35 -73 replies
4/13tools/bpf: Rename 'struct event' to avoid naming conflicttools/bpf/runqslower/runqslower.bpf.c tools/bpf/runqslower/runqslower.c tools/bpf/runqslower/runqslower.h+3 -31 reply
5/13powerpc/bpf: Skip branch range validation during first passarch/powerpc/net/bpf_jit.h+2 -20 replies
6/13powerpc/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
7/13powerpc/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
8/13powerpc64/bpf: Limit 'ldbrx' to processors compliant with ISA v2.06arch/powerpc/include/asm/ppc-opcode.h arch/powerpc/net/bpf_jit_comp64.c+14 -90 replies
9/13powerpc64/bpf: Do not save/restore LR on each call to bpf_stf_barrier()arch/powerpc/net/bpf_jit_comp64.c+1 -20 replies
10/13powerpc64/bpf: Use r12 for constant blindingarch/powerpc/net/bpf_jit64.h+1 -10 replies
11/13powerpc64/bpf elfv2: Setup kernel TOC in r2 on entryarch/powerpc/net/bpf_jit_comp64.c+7 -15 replies
12/13powerpc64/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
13/13powerpc64/bpf: Optimize instruction sequence used for function callsarch/powerpc/net/bpf_jit_comp64.c+13 -170 replies

Reviews trailers per patch

3 of 13 patches have a Reviewed-by or Acked-by.

PatchJohan AlmbladhDaniel BorkmannJiri Olsa
1/13A-b
2/13
3/13T-b
4/13A-b
5/13
6/13
7/13
8/13A-b T-b
9/13
10/13
11/13
12/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 00/13] powerpc/bpf: Some fixes and updates

A set of fixes and updates to powerpc BPF JIT:
- Patches 1-3 fix issues with the existing powerpc JIT and are tagged for -stable.
- Patch 4 fixes a build issue with bpf selftests on powerpc.
- Patches 5-9 handle some corner cases and make some small improvements.
- Patches 10-13 optimize how function calls are handled in ppc64.

Patches 7 and 8 were previously posted, and while patch 7 has no changes, patch 8 has been reworked to handle BPF_EXIT differently.

- Naveen

Naveen N. Rao (13):
bpf: Guard against accessing NULL pt_regs in bpf_get_task_stack() powerpc32/bpf: Fix codegen for bpf-to-bpf calls powerpc/bpf: Update ldimm64 instructions during extra pass tools/bpf: Rename 'struct event' to avoid naming conflict 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: Limit 'ldbrx' to processors compliant with ISA v2.06 powerpc64/bpf: Do not save/restore LR on each call to
bpf_stf_barrier()
powerpc64/bpf: Use r12 for constant blinding 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

 arch/powerpc/include/asm/ppc-opcode.h |   1 +
 arch/powerpc/net/bpf_jit.h            |   8 +-
 arch/powerpc/net/bpf_jit64.h          |   2 +-
 arch/powerpc/net/bpf_jit_comp.c       |  55 ++++++++++--
 arch/powerpc/net/bpf_jit_comp32.c     |  32 +++++--
 arch/powerpc/net/bpf_jit_comp64.c     | 124 ++++++++++++++------------
 kernel/bpf/stackmap.c                 |   5 +-
 tools/bpf/runqslower/runqslower.bpf.c |   2 +-
 tools/bpf/runqslower/runqslower.c     |   2 +-
 tools/bpf/runqslower/runqslower.h     |   2 +-
 10 files changed, 153 insertions(+), 80 deletions(-)

base-commit: bdcf18e133f656b2c97390a594fc95e37849e682

Signature · 1 line
2.34.1