* [PATCH net-next] bpf: Fix map-in-map checking in the verifier
@ 2017-08-18 1:14 Martin KaFai Lau
2017-08-18 1:17 ` Alexei Starovoitov
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Martin KaFai Lau @ 2017-08-18 1:14 UTC (permalink / raw)
To: netdev; +Cc: Alexei Starovoitov, Daniel Borkmann, kernel-team, John Fastabend
In check_map_func_compatibility(), a 'break' has been accidentally
removed for the BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS
cases. This patch adds it back.
Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support")
Cc: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
---
kernel/bpf/verifier.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 40f669ddb571..4f6e7eb42ba0 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -1523,6 +1523,7 @@ static int check_map_func_compatibility(struct bpf_map *map, int func_id)
case BPF_MAP_TYPE_HASH_OF_MAPS:
if (func_id != BPF_FUNC_map_lookup_elem)
goto error;
+ break;
case BPF_MAP_TYPE_SOCKMAP:
if (func_id != BPF_FUNC_sk_redirect_map &&
func_id != BPF_FUNC_sock_map_update &&
--
2.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] bpf: Fix map-in-map checking in the verifier
2017-08-18 1:14 [PATCH net-next] bpf: Fix map-in-map checking in the verifier Martin KaFai Lau
@ 2017-08-18 1:17 ` Alexei Starovoitov
2017-08-18 2:08 ` John Fastabend
2017-08-18 8:10 ` Daniel Borkmann
2017-08-18 23:26 ` David Miller
2 siblings, 1 reply; 5+ messages in thread
From: Alexei Starovoitov @ 2017-08-18 1:17 UTC (permalink / raw)
To: Martin KaFai Lau, netdev; +Cc: Daniel Borkmann, kernel-team, John Fastabend
On 8/17/17 6:14 PM, Martin KaFai Lau wrote:
> In check_map_func_compatibility(), a 'break' has been accidentally
> removed for the BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS
> cases. This patch adds it back.
>
> Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support")
> Cc: John Fastabend <john.fastabend@gmail.com>
> Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Nice catch!
Acked-by: Alexei Starovoitov <ast@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] bpf: Fix map-in-map checking in the verifier
2017-08-18 1:17 ` Alexei Starovoitov
@ 2017-08-18 2:08 ` John Fastabend
0 siblings, 0 replies; 5+ messages in thread
From: John Fastabend @ 2017-08-18 2:08 UTC (permalink / raw)
To: Alexei Starovoitov, Martin KaFai Lau, netdev; +Cc: Daniel Borkmann, kernel-team
On 08/17/2017 06:17 PM, Alexei Starovoitov wrote:
> On 8/17/17 6:14 PM, Martin KaFai Lau wrote:
>> In check_map_func_compatibility(), a 'break' has been accidentally
>> removed for the BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS
>> cases. This patch adds it back.
>>
>> Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support")
>> Cc: John Fastabend <john.fastabend@gmail.com>
>> Signed-off-by: Martin KaFai Lau <kafai@fb.com>
>
> Nice catch!
> Acked-by: Alexei Starovoitov <ast@kernel.org>
>
Thanks a lot!
Acked-by: John Fastabend <john.fastabend@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] bpf: Fix map-in-map checking in the verifier
2017-08-18 1:14 [PATCH net-next] bpf: Fix map-in-map checking in the verifier Martin KaFai Lau
2017-08-18 1:17 ` Alexei Starovoitov
@ 2017-08-18 8:10 ` Daniel Borkmann
2017-08-18 23:26 ` David Miller
2 siblings, 0 replies; 5+ messages in thread
From: Daniel Borkmann @ 2017-08-18 8:10 UTC (permalink / raw)
To: Martin KaFai Lau, netdev; +Cc: Alexei Starovoitov, kernel-team, John Fastabend
On 08/18/2017 03:14 AM, Martin KaFai Lau wrote:
> In check_map_func_compatibility(), a 'break' has been accidentally
> removed for the BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS
> cases. This patch adds it back.
>
> Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support")
> Cc: John Fastabend <john.fastabend@gmail.com>
> Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Thanks for spotting!
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] bpf: Fix map-in-map checking in the verifier
2017-08-18 1:14 [PATCH net-next] bpf: Fix map-in-map checking in the verifier Martin KaFai Lau
2017-08-18 1:17 ` Alexei Starovoitov
2017-08-18 8:10 ` Daniel Borkmann
@ 2017-08-18 23:26 ` David Miller
2 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2017-08-18 23:26 UTC (permalink / raw)
To: kafai; +Cc: netdev, ast, daniel, kernel-team, john.fastabend
From: Martin KaFai Lau <kafai@fb.com>
Date: Thu, 17 Aug 2017 18:14:43 -0700
> In check_map_func_compatibility(), a 'break' has been accidentally
> removed for the BPF_MAP_TYPE_ARRAY_OF_MAPS and BPF_MAP_TYPE_HASH_OF_MAPS
> cases. This patch adds it back.
>
> Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support")
> Cc: John Fastabend <john.fastabend@gmail.com>
> Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Applied.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-08-18 23:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-18 1:14 [PATCH net-next] bpf: Fix map-in-map checking in the verifier Martin KaFai Lau
2017-08-18 1:17 ` Alexei Starovoitov
2017-08-18 2:08 ` John Fastabend
2017-08-18 8:10 ` Daniel Borkmann
2017-08-18 23:26 ` David Miller
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).