All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Chenxu Di <chenxux.di@intel.com>
Cc: dev@dpdk.org, beilei.xing@intel.com, jia.guo@intel.com
Subject: Re: [dpdk-dev] [PATCH v4] net/i40e: fix out of bounds read issue
Date: Fri, 15 May 2020 11:22:16 +0800	[thread overview]
Message-ID: <20200515032216.GB105906@intel.com> (raw)
In-Reply-To: <20200514070720.31734-1-chenxux.di@intel.com>

Minor nit: 'issue' doesn't need to be mentioned in the commit title, since the
'fix' implies something is broken.

On 05/14, Chenxu Di wrote:
>This patch fixes (out-of-bounds read) coverity issue.
>
>Coverity issue: 357699
>Coverity issue: 357694
>Fixes: feaae285b342 ("net/i40e: support hash configuration in RSS flow")
>
>Signed-off-by: Chenxu Di <chenxux.di@intel.com>
>---
>v4:
>-Updated the return value.
>---
> drivers/net/i40e/i40e_ethdev.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
>diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
>index 749d85f54..91dcd0ebf 100644
>--- a/drivers/net/i40e/i40e_ethdev.c
>+++ b/drivers/net/i40e/i40e_ethdev.c
>@@ -13179,6 +13179,9 @@ i40e_rss_config_hash_function(struct i40e_pf *pf,
> 				break;
> 		}
> 
>+		if (i == UINT64_BIT)
>+			return -EINVAL;
>+
> 		for (j = I40E_FILTER_PCTYPE_INVALID + 1;
> 		     j < I40E_FILTER_PCTYPE_MAX; j++) {
> 			if (pf->adapter->pctypes_tbl[i] & (1ULL << j))
>@@ -13311,6 +13314,9 @@ i40e_rss_clear_hash_function(struct i40e_pf *pf,
> 				break;
> 		}
> 
>+		if (i == UINT64_BIT)
>+			return -EINVAL;
>+
> 		for (j = I40E_FILTER_PCTYPE_INVALID + 1;
> 		     j < I40E_FILTER_PCTYPE_MAX; j++) {
> 			if (pf->adapter->pctypes_tbl[i] & (1ULL << j))
>-- 
>2.17.1
>

Applied to dpdk-next-net-intel, Thanks.

      parent reply	other threads:[~2020-05-15  3:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07  3:09 [dpdk-dev] [PATCH] net/i40e: fix out of bounds read issue Chenxu Di
2020-05-07  5:15 ` Ye Xiaolong
2020-05-07  5:55   ` Di, ChenxuX
2020-05-07  6:30     ` Ye Xiaolong
2020-05-07  9:49 ` [dpdk-dev] [PATCH v2] " Chenxu Di
2020-05-08  2:26   ` Yang, Qiming
2020-05-08  2:36     ` Ye Xiaolong
2020-05-08  2:54       ` Yang, Qiming
2020-05-13  2:26 ` [dpdk-dev] [PATCH v3] " Chenxu Di
2020-05-13  6:51   ` Jeff Guo
2020-05-14  1:16     ` Di, ChenxuX
2020-05-14  6:17       ` Jeff Guo
2020-05-14  6:41         ` Di, ChenxuX
2020-05-14  7:07 ` [dpdk-dev] [PATCH v4] " Chenxu Di
2020-05-14  9:07   ` Jeff Guo
2020-05-15  3:22   ` Ye Xiaolong [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=20200515032216.GB105906@intel.com \
    --to=xiaolong.ye@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=chenxux.di@intel.com \
    --cc=dev@dpdk.org \
    --cc=jia.guo@intel.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.