]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: respect size hint to BPF_PROG_TEST_RUN if present
authorLorenz Bauer <lmb@cloudflare.com>
Mon, 3 Dec 2018 11:31:23 +0000 (11:31 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 4 Dec 2018 16:18:13 +0000 (08:18 -0800)
commit0ba6d7c56e22d89c7f0e61a5d2e04f4dc32a248e
tree979d2a28beaa2dcb3bba77964e7e44630694e8eb
parent9b5453c03679ad009425072e4869426fa9d9a469
bpf: respect size hint to BPF_PROG_TEST_RUN if present

Use data_size_out as a size hint when copying test output to user space.
ENOSPC is returned if the output buffer is too small.
Callers which so far did not set data_size_out are not affected.

Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/uapi/linux/bpf.h
net/bpf/test_run.c