aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c
diff options
context:
space:
mode:
authorSong Liu <song@kernel.org>2023-09-18 23:02:57 -0700
committerAlexei Starovoitov <ast@kernel.org>2023-09-19 02:58:22 -0700
commitcf094baa3e0f19f1f80ceaf205c80402b024386c (patch)
tree6bcc28b035de55dda452ce94b36f2d786714025e /tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c
parent8070274b472e2e9f5f67a990f5e697634c415708 (diff)
s390/bpf: Let arch_prepare_bpf_trampoline return program size
arch_prepare_bpf_trampoline() for s390 currently returns 0 on success. This is not a problem for regular trampoline. However, struct_ops relies on the return value to advance "image" pointer: bpf_struct_ops_map_update_elem() { ... for_each_member(i, t, member) { ... err = bpf_struct_ops_prepare_trampoline(); ... image += err; } } When arch_prepare_bpf_trampoline returns 0 on success, all members of the struct_ops will point to the same trampoline (the last one). Fix this by returning the program size in arch_prepare_bpf_trampoline (on success). This is the same behavior as other architectures. Signed-off-by: Song Liu <song@kernel.org> Fixes: 528eb2cb87bc ("s390/bpf: Implement arch_prepare_bpf_trampoline()") Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Link: https://lore.kernel.org/r/20230919060258.3237176-2-song@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c')
0 files changed, 0 insertions, 0 deletions