]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Add tests for write-only stacks/queues
authorAnton Protopopov <a.s.protopopov@gmail.com>
Wed, 27 May 2020 18:57:00 +0000 (18:57 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 1 Jun 2020 21:38:22 +0000 (14:38 -0700)
commit150c690c29aeef69a13430fd905c58048dac7af1
treec12bee6e69cccf7ebeb5b2c6b8228d0982660fe5
parentda30f7ed5483c5a92d77e4b8ca56b06ed12eef49
selftests/bpf: Add tests for write-only stacks/queues

For write-only stacks and queues bpf_map_update_elem should be allowed, but
bpf_map_lookup_elem and bpf_map_lookup_and_delete_elem should fail with EPERM.

Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200527185700.14658-6-a.s.protopopov@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_maps.c