diff options
| author | Zijian Zhang <[email protected]> | 2024-11-06 22:25:18 +0000 |
|---|---|---|
| committer | Martin KaFai Lau <[email protected]> | 2024-11-06 16:01:53 -0800 |
| commit | 15ab0548e3107665c34579ae523b2b6e7c22082a (patch) | |
| tree | dda98c950a8b6ed99f7b50041072e65790e20f40 /tools/perf/scripts/python | |
| parent | 47eae080410b1de1d7f6c79b511aaa6be865c61e (diff) | |
bpf, sockmap: Several fixes to bpf_msg_push_data
Several fixes to bpf_msg_push_data,
1. test_sockmap has tests where bpf_msg_push_data is invoked to push some
data at the end of a message, but -EINVAL is returned. In this case, in
bpf_msg_push_data, after the first loop, i will be set to msg->sg.end, add
the logic to handle it.
2. In the code block of "if (start - offset)", it's possible that "i"
points to the last of sk_msg_elem. In this case, "sk_msg_iter_next(msg,
end)" might still be called twice, another invoking is in "if (!copy)"
code block, but actually only one is needed. Add the logic to handle it,
and reconstruct the code to make the logic more clear.
Fixes: 6fff607e2f14 ("bpf: sk_msg program helper bpf_msg_push_data")
Signed-off-by: Zijian Zhang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Martin KaFai Lau <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions