linux-hardened/tools/testing/selftests/bpf
Teng Qin 8fe4592438 bpf: map_get_next_key to return first key on NULL
When iterating through a map, we need to find a key that does not exist
in the map so map_get_next_key will give us the first key of the map.
This often requires a lot of guessing in production systems.

This patch makes map_get_next_key return the first key when the key
pointer in the parameter is NULL.

Signed-off-by: Teng Qin <qinteng@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-04-25 11:57:45 -04:00
..
.gitignore bpf: Add test_tag to .gitignore 2017-02-10 15:56:08 -05:00
bpf_util.h bpf: fix multiple issues in selftest suite and samples 2016-11-27 20:38:47 -05:00
config bpf: add initial suite for selftests 2016-10-18 11:35:55 -04:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-06 08:24:51 -07:00
test_iptunnel_common.h selftests/bpf: add a test for basic XDP functionality 2017-04-01 12:45:57 -07:00
test_kmod.sh selftests: do not require bash to run bpf tests 2017-01-05 13:19:47 -07:00
test_l4lb.c selftests/bpf: add l4 load balancer test based on sched_cls 2017-04-01 12:45:57 -07:00
test_lpm_map.c bpf: Remove bpf_sys.h from selftests 2017-02-10 15:56:08 -05:00
test_lru_map.c bpf: lru: Lower the PERCPU_NR_SCANS from 16 to 4 2017-04-17 13:55:52 -04:00
test_maps.c bpf: map_get_next_key to return first key on NULL 2017-04-25 11:57:45 -04:00
test_pkt_access.c selftests/bpf: add a test for overlapping packet range checks 2017-04-01 12:45:57 -07:00
test_progs.c selftests/bpf: add l4 load balancer test based on sched_cls 2017-04-01 12:45:57 -07:00
test_tag.c bpf: Remove bpf_sys.h from selftests 2017-02-10 15:56:08 -05:00
test_verifier.c bpf: add napi_id read access to __sk_buff 2017-04-21 13:53:27 -04:00
test_xdp.c selftests/bpf: add a test for basic XDP functionality 2017-04-01 12:45:57 -07:00