OSDN Git Service

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)
commit43dd115b1fffdd8d2c4cc15659c00b2a1addbc43
treec12bee6e69cccf7ebeb5b2c6b8228d0982660fe5
parent1ea0f9120c8ce105ca181b070561df5cbd6bc049
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