selftests/bpf: Test outer map update operations in syscall program
authorHou Tao <houtao1@huawei.com>
Mon, 4 Dec 2023 14:04:25 +0000 (22:04 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 5 Dec 2023 01:50:27 +0000 (17:50 -0800)
commite3dd40828534a67931e0dd00fcd35846271fd4e8
treeb00bb98c69f23ce4e8e9ca2b06d056c07bef5b12
parent1624918be84a8bcc4f592e55635bc4fe4a96460a
selftests/bpf: Test outer map update operations in syscall program

Syscall program is running with rcu_read_lock_trace being held, so if
bpf_map_update_elem() or bpf_map_delete_elem() invokes
synchronize_rcu_tasks_trace() when operating on an outer map, there will
be dead-lock, so add a test to guarantee that it is dead-lock free.

Signed-off-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/r/20231204140425.1480317-8-houtao@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/syscall.c
tools/testing/selftests/bpf/progs/syscall.c