From: Jiri Pirko <jiri@resnulli.us>
To: Wei-Chun Chao <weichunc@plumgrid.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, ast@plumgrid.com,
xiakaixu@huawei.com
Subject: Re: [PATCH net-next] bpf: fix verifier
Date: Wed, 12 Aug 2015 15:49:36 +0200 [thread overview]
Message-ID: <20150812134936.GH2183@nanopsycho.orion> (raw)
In-Reply-To: <1439365174-4285-1-git-send-email-weichunc@plumgrid.com>
I would expect better subject, perhaps something like:
"fix array boundary in check_map_func_compatibility"
Wed, Aug 12, 2015 at 09:39:34AM CEST, weichunc@plumgrid.com wrote:
>Wrong array boundary is used.
>
>Fixes: 35578d798400 bpf: Implement function bpf_perf_event_read())
>Cc: Kaixu Xia <xiakaixu@huawei.com>
>Cc: Alexei Starovoitov <ast@plumgrid.com>
>Signed-off-by: Wei-Chun Chao <weichunc@plumgrid.com>
>---
> kernel/bpf/verifier.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
>index 48e1c71..ed12e38 100644
>--- a/kernel/bpf/verifier.c
>+++ b/kernel/bpf/verifier.c
>@@ -853,7 +853,7 @@ static int check_map_func_compatibility(struct bpf_map *map, int func_id)
> if (!map)
> return 0;
>
>- for (i = 0; i <= ARRAY_SIZE(func_limit); i++) {
>+ for (i = 0; i < ARRAY_SIZE(func_limit); i++) {
> bool_map = (map->map_type == func_limit[i].map_type);
> bool_func = (func_id == func_limit[i].func_id);
> /* only when map & func pair match it can continue.
>--
>1.9.1
>
>--
>To unsubscribe from this list: send the line "unsubscribe netdev" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2015-08-12 13:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 7:39 [PATCH net-next] bpf: fix verifier Wei-Chun Chao
2015-08-12 13:49 ` Jiri Pirko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150812134936.GH2183@nanopsycho.orion \
--to=jiri@resnulli.us \
--cc=ast@plumgrid.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=weichunc@plumgrid.com \
--cc=xiakaixu@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox