]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/bpf: Add test for trie_get_next_key()
authorByeonguk Jeong <jungbu2855@gmail.com>
Sat, 26 Oct 2024 05:04:58 +0000 (14:04 +0900)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 29 Oct 2024 20:41:41 +0000 (13:41 -0700)
commitd7f214aeacb984b9d42da0146e789f595eb09068
treed129cd813e5901055effe00d14ddbaab73b0d8f5
parent13400ac8fb80c57c2bfb12ebd35ee121ce9b4d21
selftests/bpf: Add test for trie_get_next_key()

Add a test for out-of-bounds write in trie_get_next_key() when a full
path from root to leaf exists and bpf_map_get_next_key() is called
with the leaf node. It may crashes the kernel on failure, so please
run in a VM.

Signed-off-by: Byeonguk Jeong <jungbu2855@gmail.com>
Acked-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/r/Zxx4ep78tsbeWPVM@localhost.localdomain
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/map_tests/lpm_trie_map_get_next_key.c [new file with mode: 0644]