-
- Downloads
Merge branch 'bpf: Remove recursion check for struct_ops prog'
Martin KaFai Lau says: ==================== From: Martin KaFai Lau <martin.lau@kernel.org> The struct_ops is sharing the tracing-trampoline's enter/exit function which tracks prog->active to avoid recursion. It turns out the struct_ops bpf prog will hit this prog->active and unnecessarily skipped running the struct_ops prog. eg. The '.ssthresh' may run in_task() and then interrupted by softirq that runs the same '.ssthresh'. The kernel does not call the tcp-cc's ops in a recursive way, so this set is to remove the recursion check for struct_ops prog. v3: - Clear the bpf_chg_cc_inprogress from the newly cloned tcp_sock in tcp_create_openreq_child() because the listen sk can be cloned without lock being held. (Eric Dumazet) v2: - v1 [0] turned into a long discussion on a few cases and also whether it needs to follow the bpf_run_ctx chain if there is tracing bpf_run_ctx (kprobe/trace/trampoline) running in between. It is a good signal that it is not obvious enough to reason about it and needs a tradeoff for a more straight forward approach. This revision uses one bit out of an existing 1 byte hole in the tcp_sock. It is in Patch 4. [0]: https://lore.kernel.org/bpf/20220922225616.3054840-1-kafai@fb.com/T/#md98d40ac5ec295fdadef476c227a3401b2b6b911 ==================== Signed-off-by:Alexei Starovoitov <ast@kernel.org>
No related branches found
No related tags found
Showing
- arch/x86/net/bpf_jit_comp.c 3 additions, 0 deletionsarch/x86/net/bpf_jit_comp.c
- include/linux/bpf.h 4 additions, 0 deletionsinclude/linux/bpf.h
- include/linux/tcp.h 6 additions, 0 deletionsinclude/linux/tcp.h
- kernel/bpf/trampoline.c 23 additions, 0 deletionskernel/bpf/trampoline.c
- net/core/filter.c 54 additions, 16 deletionsnet/core/filter.c
- net/ipv4/tcp_minisocks.c 1 addition, 0 deletionsnet/ipv4/tcp_minisocks.c
- tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c 4 additions, 0 deletionstools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c
- tools/testing/selftests/bpf/progs/bpf_dctcp.c 17 additions, 8 deletionstools/testing/selftests/bpf/progs/bpf_dctcp.c
Loading
Please register or sign in to comment