From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8A5FC433E0 for ; Fri, 15 May 2020 03:38:24 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id E02E820671 for ; Fri, 15 May 2020 03:38:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E02E820671 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 016621D9F0; Fri, 15 May 2020 05:30:35 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 14F9E1D9E1 for ; Fri, 15 May 2020 05:30:33 +0200 (CEST) IronPort-SDR: f8l7y5HYdJ2Ismh43nwyGNy4YJJ/u01SsdnyVSXmq8a/0eQECSaDJUW+mKr/5vS+eSpXafxRLN keGZuV4xU+Zg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2020 20:30:33 -0700 IronPort-SDR: BmBNdbdCFZo71RpdY+KYsON7x2bugigouwwN0/EqApSnUlYumEVQ/3WJ3xEcwOsT1Dzey2cEUy clw8rHQaBJ8A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,393,1583222400"; d="scan'208";a="253676964" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.116.183]) by fmsmga008.fm.intel.com with ESMTP; 14 May 2020 20:30:32 -0700 Date: Fri, 15 May 2020 11:22:16 +0800 From: Ye Xiaolong To: Chenxu Di Cc: dev@dpdk.org, beilei.xing@intel.com, jia.guo@intel.com Message-ID: <20200515032216.GB105906@intel.com> References: <20200507030928.42082-1-chenxux.di@intel.com> <20200514070720.31734-1-chenxux.di@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200514070720.31734-1-chenxux.di@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v4] net/i40e: fix out of bounds read issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 >--- >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.