]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'prog_test_run-improvement'
authorAlexei Starovoitov <ast@kernel.org>
Tue, 4 Dec 2018 16:18:14 +0000 (08:18 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 4 Dec 2018 16:18:14 +0000 (08:18 -0800)
commit43e0f0a7c14b0f829bfb9657b809c5ced75b17b0
tree416ce2a6672f6c97c074df80912ec09e2ff0c29c
parent9b5453c03679ad009425072e4869426fa9d9a469
parent568c84f801542ec17a8f88c18ae1e55e9b877c9c
Merge branch 'prog_test_run-improvement'

Lorenz Bauer says:

====================
Right now, there is no safe way to use BPF_PROG_TEST_RUN with data_out.
This is because bpf_test_finish copies the output buffer to user space
without checking its size. This can lead to the kernel overwriting
data in user space after the buffer if xdp_adjust_head and friends are
in play.

Thanks to everyone for their advice and patience with this patch set!

Changes in v5:
* Fix up libbpf.map

Changes in v4:
* Document bpf_prog_test_run and bpf_prog_test_run_xattr
* Use struct bpf_prog_test_run_attr for return values

Changes in v3:
* Introduce bpf_prog_test_run_xattr instead of modifying the existing
  function

Changes in v2:
* Make the syscall return ENOSPC if data_size_out is too small
* Make bpf_prog_test_run return EINVAL if size_out is missing
* Document the new behaviour of data_size_out
====================

Signed-off-by: Alexei Starovoitov <ast@kernel.org>