summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2026-10-17 23:09:43 +0000
committerAlexei Starovoitov <ast@kernel.org>2026-10-18 00:36:43 +0000
commit589998616e0f9190ba6f6644a19532c5b2ba66d0 (patch)
treee49a8f0d76c51959135020f75eeef3ada427dfa8 /tools/perf/scripts/python
parent19e6ca6b4a22d62a6f1dc54f230714adb4396279 (diff)
bpf: Let bpf_dynptr_write() mark a global function
The caller of a global function loses its packet pointers if the function may change packet data. That is found out by a scan for calls of the helpers which bpf_helper_changes_pkt_data() lists. bpf_dynptr_write() is not on the list, because it depends on the type of the dynptr: check_helper_call() looks at it. The scan cannot do that, and so a global function which makes a dynptr from the skb, or gets one as an argument, and writes through it counts as harmless. The write can reallocate the head of the skb, and the caller goes on with pointers into the old one, which has been freed. Let every call of bpf_dynptr_write() mark the function, as a tail call does. The same mark decides whether a program may replace a function. Fixes: 51081a3f25c7 ("bpf: track changes_pkt_data property for global functions") Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261017230950.802052-10-alexei.starovoitov@gmail.com
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions