Skip to content

powerpc/bpf: Add support for instruction array and indirect jump

[email protected] bpf linux-kselftest linuxppc-dev 3 versions – Applied

Status from this message: Applied to powerpc/next.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 1 replyApplied
  2. v24 patches 4 repliesSuperseded
  3. v14 patches 0 repliesSuperseded

Changes in v3 from the cover letter

Address minor comments
Collecting Tested-by and Acked-by tags

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4powerpc/bpf: Add support for instruction arrayarch/powerpc/net/bpf_jit_comp.c+7 -00 replies
2/4selftest/bpf: Enable instruction array test for powerpctools/testing/selftests/bpf/prog_tests/bpf_insn_array.c+1 -10 replies
3/4powerpc64/bpf: Add support for indirect jumparch/powerpc/net/bpf_jit_comp64.c+8 -00 replies
4/4selftest/bpf: Enable gotox tests for powerpc64tools/testing/selftests/bpf/progs/verifier_gotox.c+2 -20 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchHari BathiniVenkat Rao Bagalkote
1/4A-b
2/4A-b T-b
3/4A-b
4/4A-b T-b

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

Read the v3 thread

Cover letter [PATCH v3 0/4] powerpc/bpf: Add support for instruction array and indirect jump

From: Abhishek Dubey <[email protected]>

The first 2 patch enable support for instruction array. Now, the instruction offset map maintain the mapping:
original inst -> xlated inst -> jited inst

The last two patch enable support for indirect jump. Any eligile register can store jump target address for control flow to jump.

The later features will be enabled on ppc32 in a separate series.

The patch series is rebased over:
https://lore.kernel.org/bpf/[email protected]

All selftest related to instruction array and indirect jump are passing on ppc64.

# ./test_progs-cpuv4 -n 20
#20/1    bpf_gotox/one-switch:OK
#20/2    bpf_gotox/one-switch-non-zero-sec-offset:OK
#20/3    bpf_gotox/two-switches:OK
#20/4    bpf_gotox/big-jump-table:OK
#20/5    bpf_gotox/static-global:OK
#20/6    bpf_gotox/nonstatic-global:OK
#20/7    bpf_gotox/other-sec:OK
#20/8    bpf_gotox/static-global-other-sec:OK
#20/9    bpf_gotox/nonstatic-global-other-sec:OK
#20/10   bpf_gotox/one-jump-two-maps:OK
#20/11   bpf_gotox/one-map-two-jumps:OK
#20/12   bpf_gotox/check-ldimm64-off:OK
#20/13   bpf_gotox/check-ldimm64-off-gotox:OK
#20      bpf_gotox:OK
Summary: 1/13 PASSED, 0 SKIPPED, 0 FAILED
# ./test_progs-cpuv4 -n 21
#21/1    bpf_insn_array/one2one:OK
#21/2    bpf_insn_array/simple:OK
#21/3    bpf_insn_array/deletions:OK
#21/4    bpf_insn_array/deletions-with-functions:OK
#21/5    bpf_insn_array/blindness:OK
#21/6    bpf_insn_array/incorrect-index:OK
#21/7    bpf_insn_array/load-unfrozen-map:OK
#21/8    bpf_insn_array/no-map-reuse:OK
#21/9    bpf_insn_array/bpf-side-ops:OK
#21      bpf_insn_array:OK
Summary: 1/9 PASSED, 0 SKIPPED, 0 FAILED

v2->v3:
Address minor comments
Collecting Tested-by and Acked-by tags
v1->v2:
Handle image offset for ABIv1

[v2]: https://lore.kernel.org/bpf/[email protected]
[v1]: https://lore.kernel.org/bpf/[email protected]

Abhishek Dubey (4):
powerpc/bpf: Add support for instruction array selftest/bpf: Enable instruction array test for powerpc powerpc64/bpf: Add support for indirect jump selftest/bpf: Enable gotox tests for powerpc64

 arch/powerpc/net/bpf_jit_comp.c                         | 7 +++++++
 arch/powerpc/net/bpf_jit_comp64.c                       | 8 ++++++++
 tools/testing/selftests/bpf/prog_tests/bpf_insn_array.c | 2 +-
 tools/testing/selftests/bpf/progs/verifier_gotox.c      | 4 ++--
 4 files changed, 18 insertions(+), 3 deletions(-)
Signature · 1 line
2.52.0