Skip to content
Commit 02bc2b64 authored by Alexei Starovoitov's avatar Alexei Starovoitov
Browse files

Merge branch 'setsockopt-extra-mem'



Stanislav Fomichev says:

====================
Current setsockopt hook is limited to the size of the buffer that
user had supplied. Since we always allocate memory and copy the value
into kernel space, allocate just a little bit more in case BPF
program needs to override input data with a larger value.

The canonical example is TCP_CONGESTION socket option where
input buffer is a string and if user calls it with a short string,
BPF program has no way of extending it.

The tests are extended with TCP_CONGESTION use case.
====================

Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parents a98bf573 fd5ef31f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment