* [PATCH bpf-next] bpf: Increase MAX_NR_MAPS to 17 in test_verifier.c
@ 2019-04-18 21:33 Martin KaFai Lau
2019-04-18 21:45 ` Yonghong Song
2019-04-18 23:11 ` Alexei Starovoitov
0 siblings, 2 replies; 3+ messages in thread
From: Martin KaFai Lau @ 2019-04-18 21:33 UTC (permalink / raw)
To: bpf, netdev
Cc: Alexei Starovoitov, Daniel Borkmann, kernel-team, Yonghong Song
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 <kafai@fb.com>
---
tools/testing/selftests/bpf/test_verifier.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c
index 6cb6a1074fd1..ed9e894afef3 100644
--- a/tools/testing/selftests/bpf/test_verifier.c
+++ b/tools/testing/selftests/bpf/test_verifier.c
@@ -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
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] bpf: Increase MAX_NR_MAPS to 17 in test_verifier.c
2019-04-18 21:33 [PATCH bpf-next] bpf: Increase MAX_NR_MAPS to 17 in test_verifier.c Martin KaFai Lau
@ 2019-04-18 21:45 ` Yonghong Song
2019-04-18 23:11 ` Alexei Starovoitov
1 sibling, 0 replies; 3+ messages in thread
From: Yonghong Song @ 2019-04-18 21:45 UTC (permalink / raw)
To: Martin Lau, bpf, netdev; +Cc: Alexei Starovoitov, Daniel Borkmann, Kernel Team
On 4/18/19 2:33 PM, Martin KaFai Lau wrote:
> 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 <kafai@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
> ---
> tools/testing/selftests/bpf/test_verifier.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c
> index 6cb6a1074fd1..ed9e894afef3 100644
> --- a/tools/testing/selftests/bpf/test_verifier.c
> +++ b/tools/testing/selftests/bpf/test_verifier.c
> @@ -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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] bpf: Increase MAX_NR_MAPS to 17 in test_verifier.c
2019-04-18 21:33 [PATCH bpf-next] bpf: Increase MAX_NR_MAPS to 17 in test_verifier.c Martin KaFai Lau
2019-04-18 21:45 ` Yonghong Song
@ 2019-04-18 23:11 ` Alexei Starovoitov
1 sibling, 0 replies; 3+ messages in thread
From: Alexei Starovoitov @ 2019-04-18 23:11 UTC (permalink / raw)
To: Martin KaFai Lau
Cc: bpf, Network Development, Alexei Starovoitov, Daniel Borkmann,
Kernel Team, Yonghong Song
On Thu, Apr 18, 2019 at 2:34 PM Martin KaFai Lau <kafai@fb.com> wrote:
>
> 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 <kafai@fb.com>
Applied. Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-18 23:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-18 21:33 [PATCH bpf-next] bpf: Increase MAX_NR_MAPS to 17 in test_verifier.c Martin KaFai Lau
2019-04-18 21:45 ` Yonghong Song
2019-04-18 23:11 ` Alexei Starovoitov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).