]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'setsockopt-extra-mem'
authorAlexei Starovoitov <ast@kernel.org>
Thu, 1 Aug 2019 20:55:53 +0000 (13:55 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 1 Aug 2019 20:55:53 +0000 (13:55 -0700)
commit1664093358033909bbd68d6e2c9a3b43029a5646
treeea5d70a8c8822f44c1d2bea45adc64769a6167d7
parente358d38d997ed0d5b27f7cee4e6a5a43abd853d4
parentcad6433af7df09ea7eb01cf39a6149e08443b2e7
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: Alexei Starovoitov <ast@kernel.org>