Skip to content

s390/bpf: Write back tail call counter

Ilya Leoshkevich bpf 2 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. v2 Latest4 patches 0 repliesApplied 4/4
  2. v12 patches 1 replySuperseded

Patches in v2 All 4 applied

#Subject and filesSizeRepliesApplied
1/4s390/bpf: Do not write tail call counter into helper and kfunc framesarch/s390/net/bpf_jit_comp.c+12 -40 repliesApplied
2/4s390/bpf: Write back tail call counter for BPF_PSEUDO_CALLarch/s390/net/bpf_jit_comp.c+16 -70 repliesApplied
3/4s390/bpf: Write back tail call counter for BPF_TRAMP_F_CALL_ORIGarch/s390/net/bpf_jit_comp.c+3 -00 repliesApplied
4/4selftests/bpf: Clobber a lot of registers in tailcall_bpf2bpf_hierarchy teststools/testing/selftests/bpf/progs/bpf_test_utils.h tools/testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy1.c tools/testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy2.c +2 more+30 -00 repliesApplied

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH bpf-next v2 0/4] s390/bpf: Write back tail call counter

v1: https://lore.kernel.org/bpf/[email protected]/
v1 -> v2: Write back tail call counter only for BPF_PSEUDO_CALL

Hi,

This series fixes the tailcall_bpf2bpf_hierarchy test failures on s390.

It takes a simpler approach than x86_64 and aarch64: instead of introducing a pointer to the tail call counter, it copies the updated value back from the callee's frame to the caller's frame. This needs to be done in two locations: after BPF_PSEUDO_CALL and after BPF_TRAMP_F_CALL_ORIG.

Patch 1 is a cleanup, patches 2 and 3 are the actual fixes, patch 4 improves the hierarchy tests in order to catch issues with accidentally clobbering the counter.

Best regards,
Ilya

Ilya Leoshkevich (4):
s390/bpf: Do not write tail call counter into helper and kfunc frames s390/bpf: Write back tail call counter for BPF_PSEUDO_CALL s390/bpf: Write back tail call counter for BPF_TRAMP_F_CALL_ORIG selftests/bpf: Clobber a lot of registers in
tailcall_bpf2bpf_hierarchy tests

 arch/s390/net/bpf_jit_comp.c                  | 42 ++++++++++++++-----
 .../selftests/bpf/progs/bpf_test_utils.h      | 18 ++++++++
 .../bpf/progs/tailcall_bpf2bpf_hierarchy1.c   |  3 ++
 .../bpf/progs/tailcall_bpf2bpf_hierarchy2.c   |  3 ++
 .../bpf/progs/tailcall_bpf2bpf_hierarchy3.c   |  3 ++
 .../progs/tailcall_bpf2bpf_hierarchy_fentry.c |  3 ++
 6 files changed, 61 insertions(+), 11 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/bpf_test_utils.h
Signature · 1 line
2.50.1