From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: "Min Hu (Connor)" <humin29@huawei.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Yigit, Ferruh" <ferruh.yigit@intel.com>,
"Ananyev, Konstantin" <konstantin.ananyev@intel.com>
Subject: Re: [dpdk-dev] [PATCH] bpf: fix unreachable statement
Date: Thu, 22 Apr 2021 11:23:42 +0000 [thread overview]
Message-ID: <DM6PR11MB4491F90E08F9D2EF76C1F7699A469@DM6PR11MB4491.namprd11.prod.outlook.com> (raw)
In-Reply-To: <1619076601-30228-1-git-send-email-humin29@huawei.com>
> From: HongBo Zheng <zhenghongbo3@huawei.com>
>
> In function 'eval_jcc', judgment 'op == EBPF_JLT' occurs
> twice, as a result, the corresponding second statement
> cannot be accessed.
>
> This patch fix this problem.
>
> Fixes: 8021917293d0 ("bpf: add extra validation for input BPF program")
> Cc: stable@dpdk.org
>
> Signed-off-by: HongBo Zheng <zhenghongbo3@huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
> ---
> lib/librte_bpf/bpf_validate.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/librte_bpf/bpf_validate.c b/lib/librte_bpf/bpf_validate.c
> index 9214f15..7b1291b 100644
> --- a/lib/librte_bpf/bpf_validate.c
> +++ b/lib/librte_bpf/bpf_validate.c
> @@ -1115,7 +1115,7 @@ eval_jcc(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
> eval_jsgt_jsle(trd, trs, frd, frs);
> else if (op == EBPF_JSLE)
> eval_jsgt_jsle(frd, frs, trd, trs);
> - else if (op == EBPF_JLT)
> + else if (op == EBPF_JSLT)
> eval_jslt_jsge(trd, trs, frd, frs);
> else if (op == EBPF_JSGE)
> eval_jslt_jsge(frd, frs, trd, trs);
> --
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> 2.7.4
next prev parent reply other threads:[~2021-04-22 11:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 7:30 [dpdk-dev] [PATCH] bpf: fix unreachable statement Min Hu (Connor)
2021-04-22 11:23 ` Ananyev, Konstantin [this message]
2021-05-05 10:23 ` Thomas Monjalon
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=DM6PR11MB4491F90E08F9D2EF76C1F7699A469@DM6PR11MB4491.namprd11.prod.outlook.com \
--to=konstantin.ananyev@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=humin29@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.