summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
authorMartin KaFai Lau <martin.lau@kernel.org>2025-01-30 00:31:19 +0300
committerMartin KaFai Lau <martin.lau@kernel.org>2025-01-30 00:33:10 +0300
commit9bf412d4d5b1f431e6cdd8111094be39c031036c (patch)
treef01b165541b84bf465130e3e20902b031391fe37 /tools/perf/scripts/python/syscall-counts.py
parentbc27c52eea189e8f7492d40739b7746d67b65beb (diff)
parent6fcfe96e0f6e9bebe1b185f1548a9a8cb1b68dea (diff)
downloadlinux-9bf412d4d5b1f431e6cdd8111094be39c031036c.tar.xz
Merge branch 'bpf-fix-wrong-copied_seq-calculation-and-add-tests'
Jiayuan Chen says: ==================== A previous commit described in this topic http://lore.kernel.org/bpf/20230523025618.113937-9-john.fastabend@gmail.com directly updated 'sk->copied_seq' in the tcp_eat_skb() function when the action of a BPF program was SK_REDIRECT. For other actions, like SK_PASS, the update logic for 'sk->copied_seq' was moved to tcp_bpf_recvmsg_parser() to ensure the accuracy of the 'fionread' feature. That commit works for a single stream_verdict scenario, as it also modified 'sk_data_ready->sk_psock_verdict_data_ready->tcp_read_skb' to remove updating 'sk->copied_seq'. However, for programs where both stream_parser and stream_verdict are active (strparser purpose), tcp_read_sock() was used instead of tcp_read_skb() (sk_data_ready->strp_data_ready->tcp_read_sock). tcp_read_sock() now still updates 'sk->copied_seq', leading to duplicated updates. In summary, for strparser + SK_PASS, copied_seq is redundantly calculated in both tcp_read_sock() and tcp_bpf_recvmsg_parser(). The issue causes incorrect copied_seq calculations, which prevent correct data reads from the recv() interface in user-land. Also we added test cases for bpf + strparser and separated them from sockmap_basic, as strparser has more encapsulation and parsing capabilities compared to sockmap. ==================== Link: https://patch.msgid.link/20250122100917.49845-1-mrpre@163.com Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions