mbox series

[bpf-next,v2,00/31] Support bpf trampoline for s390x

Message ID 20230128000650.1516334-1-iii@linux.ibm.com (mailing list archive)
Headers show
Series Support bpf trampoline for s390x | expand

Message

Ilya Leoshkevich Jan. 28, 2023, 12:06 a.m. UTC
v1: https://lore.kernel.org/bpf/20230125213817.1424447-1-iii@linux.ibm.com/#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, mixing subprogs and
tailcalls, and fixes a number of tests 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 31.

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

Best regards,
Ilya

Ilya Leoshkevich (31):
  bpf: Use ARG_CONST_SIZE_OR_ZERO for 3rd argument of
    bpf_tcp_raw_gen_syncookie_ipv{4,6}()
  bpf: Change BPF_MAX_TRAMP_LINKS to enum
  selftests/bpf: Query BPF_MAX_TRAMP_LINKS using BTF
  selftests/bpf: Fix liburandom_read.so linker error
  selftests/bpf: Fix symlink creation error
  selftests/bpf: Fix kfree_skb on s390x
  selftests/bpf: Set errno when urand_spawn() fails
  selftests/bpf: Fix decap_sanity_ns cleanup
  selftests/bpf: Fix verify_pkcs7_sig on s390x
  selftests/bpf: Fix xdp_do_redirect on s390x
  selftests/bpf: Fix cgrp_local_storage on s390x
  selftests/bpf: Check stack_mprotect() return value
  selftests/bpf: Increase SIZEOF_BPF_LOCAL_STORAGE_ELEM on s390x
  selftests/bpf: Add a sign-extension test for kfuncs
  selftests/bpf: Fix test_lsm on s390x
  selftests/bpf: Fix test_xdp_adjust_tail_grow2 on s390x
  selftests/bpf: Fix vmlinux test on s390x
  selftests/bpf: Fix sk_assign on s390x
  selftests/bpf: Fix xdp_synproxy/tc on s390x
  selftests/bpf: Fix profiler on s390x
  libbpf: Simplify barrier_var()
  libbpf: Fix unbounded memory access in bpf_usdt_arg()
  libbpf: Fix BPF_PROBE_READ{_STR}_INTO() on s390x
  bpf: iterators: Split iterators.lskel.h into little- and big- endian
    versions
  bpf: btf: Add BTF_FMODEL_SIGNED_ARG flag
  s390/bpf: Fix a typo in a comment
  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()

 arch/s390/net/bpf_jit_comp.c                  | 714 +++++++++++++++++-
 include/linux/bpf.h                           |  12 +-
 include/linux/btf.h                           |  15 +-
 kernel/bpf/btf.c                              |  16 +-
 kernel/bpf/preload/bpf_preload_kern.c         |   6 +-
 kernel/bpf/preload/iterators/Makefile         |  12 +-
 kernel/bpf/preload/iterators/README           |   5 +-
 .../iterators/iterators.lskel-big-endian.h    | 419 ++++++++++
 ...skel.h => iterators.lskel-little-endian.h} |   0
 net/bpf/test_run.c                            |   9 +
 net/core/filter.c                             |   4 +-
 tools/lib/bpf/bpf_core_read.h                 |   4 +-
 tools/lib/bpf/bpf_helpers.h                   |   2 +-
 tools/lib/bpf/usdt.bpf.h                      |   5 +-
 tools/testing/selftests/bpf/Makefile          |   5 +-
 tools/testing/selftests/bpf/netcnt_common.h   |   6 +-
 .../selftests/bpf/prog_tests/bpf_cookie.c     |   6 +-
 .../bpf/prog_tests/cgrp_local_storage.c       |   2 +-
 .../selftests/bpf/prog_tests/decap_sanity.c   |   2 +-
 .../selftests/bpf/prog_tests/fexit_stress.c   |  22 +-
 .../selftests/bpf/prog_tests/kfree_skb.c      |   2 +-
 .../selftests/bpf/prog_tests/kfunc_call.c     |   1 +
 .../selftests/bpf/prog_tests/sk_assign.c      |   5 +-
 .../selftests/bpf/prog_tests/test_lsm.c       |   3 +-
 .../bpf/prog_tests/trampoline_count.c         |  18 +-
 tools/testing/selftests/bpf/prog_tests/usdt.c |   1 +
 .../bpf/prog_tests/verify_pkcs7_sig.c         |   3 +
 .../bpf/prog_tests/xdp_adjust_tail.c          |   7 +-
 .../bpf/prog_tests/xdp_do_redirect.c          |   4 +
 .../selftests/bpf/progs/kfunc_call_test.c     |  18 +
 tools/testing/selftests/bpf/progs/lsm.c       |   7 +-
 .../selftests/bpf/progs/profiler.inc.h        |  62 +-
 .../selftests/bpf/progs/test_sk_assign.c      |  24 +-
 .../bpf/progs/test_verify_pkcs7_sig.c         |  12 +-
 .../selftests/bpf/progs/test_vmlinux.c        |   4 +-
 .../bpf/progs/test_xdp_adjust_tail_grow.c     |   8 +-
 .../selftests/bpf/progs/xdp_synproxy_kern.c   |   2 +-
 tools/testing/selftests/bpf/test_progs.c      |  38 +
 tools/testing/selftests/bpf/test_progs.h      |   2 +
 39 files changed, 1350 insertions(+), 137 deletions(-)
 create mode 100644 kernel/bpf/preload/iterators/iterators.lskel-big-endian.h
 rename kernel/bpf/preload/iterators/{iterators.lskel.h => iterators.lskel-little-endian.h} (100%)

Comments

patchwork-bot+netdevbpf@kernel.org Jan. 28, 2023, 8:50 p.m. UTC | #1
Hello:

This series was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Sat, 28 Jan 2023 01:06:19 +0100 you wrote:
> v1: https://lore.kernel.org/bpf/20230125213817.1424447-1-iii@linux.ibm.com/#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.
> 
> [...]

Here is the summary with links:
  - [bpf-next,v2,01/31] bpf: Use ARG_CONST_SIZE_OR_ZERO for 3rd argument of bpf_tcp_raw_gen_syncookie_ipv{4,6}()
    https://git.kernel.org/bpf/bpf-next/c/bf3849755ac6
  - [bpf-next,v2,02/31] bpf: Change BPF_MAX_TRAMP_LINKS to enum
    https://git.kernel.org/bpf/bpf-next/c/390a07a921b3
  - [bpf-next,v2,03/31] selftests/bpf: Query BPF_MAX_TRAMP_LINKS using BTF
    https://git.kernel.org/bpf/bpf-next/c/8fb9fb2f1728
  - [bpf-next,v2,04/31] selftests/bpf: Fix liburandom_read.so linker error
    https://git.kernel.org/bpf/bpf-next/c/b14b01f281f7
  - [bpf-next,v2,05/31] selftests/bpf: Fix symlink creation error
    https://git.kernel.org/bpf/bpf-next/c/6eab2370d142
  - [bpf-next,v2,06/31] selftests/bpf: Fix kfree_skb on s390x
    https://git.kernel.org/bpf/bpf-next/c/31da9be64a11
  - [bpf-next,v2,07/31] selftests/bpf: Set errno when urand_spawn() fails
    https://git.kernel.org/bpf/bpf-next/c/804acdd251e8
  - [bpf-next,v2,08/31] selftests/bpf: Fix decap_sanity_ns cleanup
    https://git.kernel.org/bpf/bpf-next/c/98e13848cf43
  - [bpf-next,v2,09/31] selftests/bpf: Fix verify_pkcs7_sig on s390x
    https://git.kernel.org/bpf/bpf-next/c/56e1a5048319
  - [bpf-next,v2,10/31] selftests/bpf: Fix xdp_do_redirect on s390x
    https://git.kernel.org/bpf/bpf-next/c/06c1865b0b0c
  - [bpf-next,v2,11/31] selftests/bpf: Fix cgrp_local_storage on s390x
    https://git.kernel.org/bpf/bpf-next/c/06cea99e683c
  - [bpf-next,v2,12/31] selftests/bpf: Check stack_mprotect() return value
    https://git.kernel.org/bpf/bpf-next/c/2934565f04fd
  - [bpf-next,v2,13/31] selftests/bpf: Increase SIZEOF_BPF_LOCAL_STORAGE_ELEM on s390x
    https://git.kernel.org/bpf/bpf-next/c/80a611904eef
  - [bpf-next,v2,14/31] selftests/bpf: Add a sign-extension test for kfuncs
    https://git.kernel.org/bpf/bpf-next/c/be6b5c10ecc4
  - [bpf-next,v2,15/31] selftests/bpf: Fix test_lsm on s390x
    https://git.kernel.org/bpf/bpf-next/c/207612eb12b9
  - [bpf-next,v2,16/31] selftests/bpf: Fix test_xdp_adjust_tail_grow2 on s390x
    https://git.kernel.org/bpf/bpf-next/c/26e8a0149479
  - [bpf-next,v2,17/31] selftests/bpf: Fix vmlinux test on s390x
    https://git.kernel.org/bpf/bpf-next/c/d504270a233d
  - [bpf-next,v2,18/31] selftests/bpf: Fix sk_assign on s390x
    (no matching commit)
  - [bpf-next,v2,19/31] selftests/bpf: Fix xdp_synproxy/tc on s390x
    https://git.kernel.org/bpf/bpf-next/c/438a2edf26b7
  - [bpf-next,v2,20/31] selftests/bpf: Fix profiler on s390x
    https://git.kernel.org/bpf/bpf-next/c/1b5e38532581
  - [bpf-next,v2,21/31] libbpf: Simplify barrier_var()
    https://git.kernel.org/bpf/bpf-next/c/e85465e420be
  - [bpf-next,v2,22/31] libbpf: Fix unbounded memory access in bpf_usdt_arg()
    https://git.kernel.org/bpf/bpf-next/c/25c76ed42821
  - [bpf-next,v2,23/31] libbpf: Fix BPF_PROBE_READ{_STR}_INTO() on s390x
    https://git.kernel.org/bpf/bpf-next/c/42fae973c2b1
  - [bpf-next,v2,24/31] bpf: iterators: Split iterators.lskel.h into little- and big- endian versions
    https://git.kernel.org/bpf/bpf-next/c/0f0e5f5bd506
  - [bpf-next,v2,25/31] bpf: btf: Add BTF_FMODEL_SIGNED_ARG flag
    https://git.kernel.org/bpf/bpf-next/c/49f67f393ff2
  - [bpf-next,v2,26/31] s390/bpf: Fix a typo in a comment
    https://git.kernel.org/bpf/bpf-next/c/07dcbd7325ce
  - [bpf-next,v2,27/31] s390/bpf: Add expoline to tail calls
    (no matching commit)
  - [bpf-next,v2,28/31] s390/bpf: Implement bpf_arch_text_poke()
    (no matching commit)
  - [bpf-next,v2,29/31] s390/bpf: Implement arch_prepare_bpf_trampoline()
    (no matching commit)
  - [bpf-next,v2,30/31] s390/bpf: Implement bpf_jit_supports_subprog_tailcalls()
    (no matching commit)
  - [bpf-next,v2,31/31] s390/bpf: Implement bpf_jit_supports_kfunc_call()
    (no matching commit)

You are awesome, thank you!