diff options
| author | KaFai Wan <kafai.wan@linux.dev> | 2026-04-21 18:58:03 +0300 |
|---|---|---|
| committer | Martin KaFai Lau <martin.lau@kernel.org> | 2026-04-22 22:59:49 +0300 |
| commit | 52b6b5334924d8f083a2abe8edeface9206e13ee (patch) | |
| tree | 9392b499496c8344f84dbb6b57fd172a4b73e143 /include/linux | |
| parent | 54377fcab51f6f1f8807827d3751be42279e1a6a (diff) | |
| download | linux-52b6b5334924d8f083a2abe8edeface9206e13ee.tar.xz | |
selftests/bpf: Test TCP_NODELAY in TCP hdr opt callbacks
Add a sockops selftest for the TCP_NODELAY restriction in
BPF_SOCK_OPS_HDR_OPT_LEN_CB and BPF_SOCK_OPS_WRITE_HDR_OPT_CB.
With BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG enabled,
bpf_setsockopt(TCP_NODELAY) returns -EOPNOTSUPP from
BPF_SOCK_OPS_HDR_OPT_LEN_CB and BPF_SOCK_OPS_WRITE_HDR_OPT_CB, avoiding
unbounded recursion and kernel stack overflow.
Other cases continue to work as before, including
BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB.
Signed-off-by: KaFai Wan <kafai.wan@linux.dev>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Reviewed-by: Jiayuan Chen <jiayuan.chen@linux.dev>
Link: https://patch.msgid.link/20260421155804.135786-4-kafai.wan@linux.dev
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
