aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/sockopt_sk.c
diff options
context:
space:
mode:
authorStanislav Fomichev <sdf@google.com>2019-07-29 14:51:10 -0700
committerAlexei Starovoitov <ast@kernel.org>2019-08-01 13:55:52 -0700
commit9babe825da769cfbd7080f95e6bddbe98ce6b95d (patch)
treea801f1b825ea6f3eef8cdf1a9306984f91426747 /tools/testing/selftests/bpf/progs/sockopt_sk.c
parenttools: bpftool: add support for reporting the effective cgroup progs (diff)
downloadlinux-dev-9babe825da769cfbd7080f95e6bddbe98ce6b95d.tar.xz
linux-dev-9babe825da769cfbd7080f95e6bddbe98ce6b95d.zip
bpf: always allocate at least 16 bytes for setsockopt hook
Since we always allocate memory, allocate just a little bit more for the BPF program in case it need to override user input with bigger value. The canonical example is TCP_CONGESTION where input string might be too small to override (nv -> bbr or cubic). 16 bytes are chosen to match the size of TCP_CA_NAME_MAX and can be extended in the future if needed. Signed-off-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/sockopt_sk.c')
0 files changed, 0 insertions, 0 deletions