Skip to content

Support bpf trampoline for s390x

Ilya Leoshkevich bpf 3 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 5 repliesApplied 8/8
  2. v231 patches 2 repliesSuperseded 25 of 31 applied
  3. v124 patches 21 repliesSuperseded

Changes in v3 from the cover letter

- Make __arch_prepare_bpf_trampoline static.
(Reported-by: kernel test robot <[email protected]>)
- Support both old- and new- style map definitions in sk_assign. (Alexei)
- Trim DENYLIST.s390x. (Alexei)
- Adjust s390x vmlinux path in vmtest.sh.
- Drop merged fixes.

Patches in v3 All 8 applied

#Subject and filesSizeRepliesApplied
1/8selftests/bpf: Fix sk_assign on s390xtools/testing/selftests/bpf/prog_tests/sk_assign.c tools/testing/selftests/bpf/progs/test_sk_assign.c tools/testing/selftests/bpf/progs/test_sk_assign_libbpf.c+33 -60 repliesApplied
2/8s390/bpf: Add expoline to tail callsarch/s390/net/bpf_jit_comp.c+10 -20 repliesApplied
3/8s390/bpf: Implement bpf_arch_text_poke()arch/s390/net/bpf_jit_comp.c+97 -00 repliesApplied
4/8s390/bpf: Implement arch_prepare_bpf_trampoline()arch/s390/net/bpf_jit_comp.c include/linux/bpf.h+524 -220 repliesApplied
5/8s390/bpf: Implement bpf_jit_supports_subprog_tailcalls()arch/s390/net/bpf_jit_comp.c+27 -100 repliesApplied
6/8s390/bpf: Implement bpf_jit_supports_kfunc_call()arch/s390/net/bpf_jit_comp.c+23 -20 repliesApplied
7/8selftests/bpf: Fix s390x vmlinux pathtools/testing/selftests/bpf/vmtest.sh+1 -10 repliesApplied
8/8selftests/bpf: Trim DENYLIST.s390xtools/testing/selftests/bpf/DENYLIST.s390x+0 -690 repliesApplied

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH bpf-next v3 0/8] Support bpf trampoline for s390x

v2: https://lore.kernel.org/bpf/[email protected]/#t
v2 -> v3:
- Make __arch_prepare_bpf_trampoline static.
(Reported-by: kernel test robot <[email protected]>)
- Support both old- and new- style map definitions in sk_assign. (Alexei)
- Trim DENYLIST.s390x. (Alexei)
- Adjust s390x vmlinux path in vmtest.sh.
- Drop merged fixes.

v1: https://lore.kernel.org/bpf/[email protected]/#t
v1 -> v2:
- Fix core_read_macros, sk_assign, test_profiler, test_bpffs (24/31; I'm not quite happy with the fix, but don't have better ideas), and xdp_synproxy. (Andrii)
- Prettify liburandom_read and verify_pkcs7_sig fixes. (Andrii)
- Fix bpf_usdt_arg using barrier_var(); prettify barrier_var(). (Andrii)
- Change BPF_MAX_TRAMP_LINKS to enum and query it using BTF. (Andrii)
- Improve bpf_jit_supports_kfunc_call() description. (Alexei)
- Always check sign_extend() return value.
- Cc: Alexander Gordeev.

Hi,

This series implements poke, trampoline, kfunc, and mixing subprogs and tailcalls on s390x.

The following failures still remain:

#82 get_stack_raw_tp:FAIL
get_stack_print_output:FAIL:user_stack corrupted user stack Known issue:
We cannot reliably unwind userspace on s390x without DWARF.

#101 ksyms_module:FAIL
address of kernel function bpf_testmod_test_mod_kfunc is out of range Known issue:
Kernel and modules are too far away from each other on s390x.

#190 stacktrace_build_id:FAIL
Known issue:
We cannot reliably unwind userspace on s390x without DWARF.

#281 xdp_metadata:FAIL
See patch 6.

None of these seem to be due to the new changes.

Best regards,
Ilya

Ilya Leoshkevich (8):
selftests/bpf: Fix sk_assign on s390x
s390/bpf: Add expoline to tail calls
s390/bpf: Implement bpf_arch_text_poke() s390/bpf: Implement arch_prepare_bpf_trampoline() s390/bpf: Implement bpf_jit_supports_subprog_tailcalls() s390/bpf: Implement bpf_jit_supports_kfunc_call() selftests/bpf: Fix s390x vmlinux path selftests/bpf: Trim DENYLIST.s390x

 arch/s390/net/bpf_jit_comp.c                  | 713 +++++++++++++++++-
 include/linux/bpf.h                           |   4 +
 tools/testing/selftests/bpf/DENYLIST.s390x    |  69 --
 .../selftests/bpf/prog_tests/sk_assign.c      |  25 +-
 .../selftests/bpf/progs/test_sk_assign.c      |  11 +
 .../bpf/progs/test_sk_assign_libbpf.c         |   3 +
 tools/testing/selftests/bpf/vmtest.sh         |   2 +-
 7 files changed, 715 insertions(+), 112 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/test_sk_assign_libbpf.c
Signature · 1 line
2.39.1