diff options
author | Jason Xing <kerneljasonxing@gmail.com> | 2025-02-20 15:29:32 +0800 |
---|---|---|
committer | Martin KaFai Lau <martin.lau@kernel.org> | 2025-02-20 14:29:10 -0800 |
commit | 2958624b25305142e24203165ff65409ba9dd9d7 (patch) | |
tree | 5d1bb28eae490c7f297b47f3c7f7056a47b2871f /scripts/gdb/linux/interrupts.py | |
parent | fd93eaffb3f977b23bc0a48d4c8616e654fcf133 (diff) |
bpf: Disable unsafe helpers in TX timestamping callbacks
New TX timestamping sock_ops callbacks will be added in the
subsequent patch. Some of the existing BPF helpers will not
be safe to be used in the TX timestamping callbacks.
The bpf_sock_ops_setsockopt, bpf_sock_ops_getsockopt, and
bpf_sock_ops_cb_flags_set require owning the sock lock. TX
timestamping callbacks will not own the lock.
The bpf_sock_ops_load_hdr_opt needs the skb->data pointing
to the TCP header. This will not be true in the TX timestamping
callbacks.
At the beginning of these helpers, this patch checks the
bpf_sock->op to ensure these helpers are used by the existing
sock_ops callbacks only.
Signed-off-by: Jason Xing <kerneljasonxing@gmail.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20250220072940.99994-5-kerneljasonxing@gmail.com
Diffstat (limited to 'scripts/gdb/linux/interrupts.py')
0 files changed, 0 insertions, 0 deletions