mbox series

[bpf,0/2] s390/bpf: Fix arch_prepare_bpf_trampoline

Message ID 20230919060258.3237176-1-song@kernel.org (mailing list archive)
Headers show
Series s390/bpf: Fix arch_prepare_bpf_trampoline | expand

Message

Song Liu Sept. 19, 2023, 6:02 a.m. UTC
While working on trampoline, I found s390's arch_prepare_bpf_trampoline
returns 0 on success, which breaks struct_ops. However, the CI doesn't
catch this issue. Turns out test_progs:bpf_tcp_ca doesn't really test
members of a struct_ops are actually called via the trampolines.

1/2 fixes arch_prepare_bpf_trampoline for s390.
2/2 adds a check to test_progs:bpf_tcp_ca to verify bpf_cubic_acked() is
indeed called by the trampoline. Without 1/2, this check would fail on
s390.

Song Liu (2):
  s390/bpf: Let arch_prepare_bpf_trampoline return program size
  selftests/bpf: Check bpf_cubic_acked() is called via struct_ops

 arch/s390/net/bpf_jit_comp.c                        | 2 +-
 tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c | 2 ++
 tools/testing/selftests/bpf/progs/bpf_cubic.c       | 3 +++
 3 files changed, 6 insertions(+), 1 deletion(-)

--
2.34.1

Comments

patchwork-bot+netdevbpf@kernel.org Sept. 19, 2023, 10:10 a.m. UTC | #1
Hello:

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

On Mon, 18 Sep 2023 23:02:56 -0700 you wrote:
> While working on trampoline, I found s390's arch_prepare_bpf_trampoline
> returns 0 on success, which breaks struct_ops. However, the CI doesn't
> catch this issue. Turns out test_progs:bpf_tcp_ca doesn't really test
> members of a struct_ops are actually called via the trampolines.
> 
> 1/2 fixes arch_prepare_bpf_trampoline for s390.
> 2/2 adds a check to test_progs:bpf_tcp_ca to verify bpf_cubic_acked() is
> indeed called by the trampoline. Without 1/2, this check would fail on
> s390.
> 
> [...]

Here is the summary with links:
  - [bpf,1/2] s390/bpf: Let arch_prepare_bpf_trampoline return program size
    https://git.kernel.org/bpf/bpf/c/cf094baa3e0f
  - [bpf,2/2] selftests/bpf: Check bpf_cubic_acked() is called via struct_ops
    https://git.kernel.org/bpf/bpf/c/48f5e7d3f730

You are awesome, thank you!