bpf: Increase MAX_NR_MAPS to 17 in test_verifier.c
Subsystems (5)
PATCH 1/1 bpf: Increase MAX_NR_MAPS to 17 in test_verifier.c
map_fds[16] is the last one index-ed by fixup_map_array_small. Hence, the MAX_NR_MAPS should be 17 instead.
Fixes fb2abb73e575 ("bpf, selftest: test {rd, wr}only flags and direct value access")
Signed-off-by Martin KaFai Lau <[email protected]>
--- tools/testing/selftests/bpf/test_verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/bpf/test_verifier.c +1 -1
@@ -52,7 +52,7 @@#define MAX_INSNS BPF_MAXINSNS#define MAX_TEST_INSNS 1000000#define MAX_FIXUPS 8 -#define MAX_NR_MAPS 16 +#define MAX_NR_MAPS 17#define MAX_TEST_RUNS 8#define POINTER_VALUE 0xcafe4all#define TEST_DATA_LEN 64
Signature · 1 line
2.17.1
Quoted 5 lines · Martin KaFai Lau
map_fds[16] is the last one index-ed by
fixup_map_array_small. Hence, theMAX_NR_MAPSshould be 17 instead.Fixes fb2abb73e575 ("bpf, selftest: test {rd, wr}only flags and direct value access")Signed-off-by Martin KaFai Lau <[email protected]>
Acked-by Yonghong Song <[email protected]>
Quoted 18 lines
--- tools/testing/selftests/bpf/test_verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/bpf/test_verifier.c +1
-1@@ -52,7 +52,7 @@#define MAX_INSNS BPF_MAXINSNS#define MAX_TEST_INSNS 1000000#define MAX_FIXUPS 8 -#define MAX_NR_MAPS 16 +#define MAX_NR_MAPS 17#define MAX_TEST_RUNS 8#define POINTER_VALUE 0xcafe4all#define TEST_DATA_LEN 64
Alexei Starovoitov
AppliedQuoted 6 lines · Martin KaFai Lau
map_fds[16] is the last one index-ed by
fixup_map_array_small. Hence, theMAX_NR_MAPSshould be 17 instead.Fixes fb2abb73e575 ("bpf, selftest: test {rd, wr}only flags and direct value access")Signed-off-by Martin KaFai Lau <[email protected]>
Applied. Thanks