From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50077.outbound.protection.outlook.com [40.107.5.77]) by dpdk.org (Postfix) with ESMTP id A00CE1B725 for ; Mon, 9 Apr 2018 09:08:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=6xvPKmuoV+8I/4DUW21ny/qRrux4qJAaJAfukNTIuhA=; b=aqm6qCYZdqSHXyFUKKaC4zLDtSiqaLkNdtEeHKT09V5CCncObS7d51OvyXiEgTCeqxrdl3bb9pvXMhdTOG+F3g4XPdFIWW/izuNgZEXiy3EFEap75iVyXyuN6BSJdHuiB0Mi8mIq069pxPRPJyHfg0k5tfJv8GZJziaRrFEhgxA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from [10.232.14.39] (14.142.187.166) by DB6PR0402MB2776.eurprd04.prod.outlook.com (2603:10a6:4:96::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.653.12; Mon, 9 Apr 2018 07:08:19 +0000 To: Hemant Agrawal , ferruh.yigit@intel.com Cc: dev@dpdk.org References: <1522918464-4586-1-git-send-email-hemant.agrawal@nxp.com> <1522918464-4586-4-git-send-email-hemant.agrawal@nxp.com> From: Shreyansh Jain Message-ID: <8e340f7c-b20d-0947-5ef0-a6482a09094b@nxp.com> Date: Mon, 9 Apr 2018 12:53:26 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1522918464-4586-4-git-send-email-hemant.agrawal@nxp.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: MAXPR0101CA0024.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:c::34) To DB6PR0402MB2776.eurprd04.prod.outlook.com (2603:10a6:4:96::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 039fdd5d-b8af-44ff-e2d7-08d59de8ad0b X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(48565401081)(2017052603328)(7153060)(7193020); SRVR:DB6PR0402MB2776; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0402MB2776; 3:CYdaxxd3FYiZF+N/4N1bUPz4k3cCzGmm0CEsHu+pQV2oawWKQVmzSNnBO1erJRXwk9UAeRYC69fk8VYXxRBR3th3Jw3bqGdOZfBETlIRcIZra4hVN7c/hYSE/ZWxqqF6AoJ477lU0MQSh0XLqbEF+HYyyDohxlftzjZjYHe4iCSV11RNcyPEx/eC0lpGYp3Id1/vL+anPJBefwo+gVkf24SJHLpE4VgtR4Uh3faITKc63qHM8SGkrn3PP3FbvCAz; 25:VJ3wKF3dlzKOiOQi2YWsub+mLijC3Fb4dwsRrLCHTdsHKnf0Vkf+gro0idIaL8c4ZZYptq0ZFkTbx7w7O3p/DuKAfw/jr2RttzPfaVhTOTnT12n7Gikvj3KYS0SV+KVNB8b/l/AZounh/+HGZ5s4+7Wf42JYz3Ui2lSDTos9SvgEuUKUI7tRjO/9dobpLV75kHVb8ECDhTQT7zNod0J/fuqffztMMor4tNtjF0ZvVMD2Kp89jS28XU/LQf02zSm/KSbUUHV9eZgkxUAR18zgjUnhrJFQvTwWJwzny3uHHzOdKttYfp5Jfmf0z0q1ij7ZP/dTxcLBY9A2dZWJtzmwMw==; 31:lF0WVlwBSw/en7+4K92u/cQJF7s3n5qDrxeSCIag77Oz4NZ141Hx2R4VllwiytZ7x6+1WPn321c/wmc6I7CxGx8wLCI31PjcsEZzQIGOoXr9s64UpodZu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riScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231221)(944501327)(52105095)(3002001)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011); SRVR:DB6PR0402MB2776; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0402MB2776; X-Forefront-PRVS: 0637FCE711 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(366004)(39860400002)(376002)(346002)(396003)(39380400002)(199004)(189003)(86362001)(47776003)(76176011)(106356001)(4326008)(55236004)(316002)(36756003)(68736007)(16576012)(59450400001)(386003)(77096007)(186003)(105586002)(64126003)(52116002)(50466002)(16526019)(26005)(7736002)(67846002)(31686004)(305945005)(5660300001)(53936002)(6246003)(65826007)(229853002)(58126008)(23676004)(6666003)(2486003)(52146003)(11346002)(478600001)(65956001)(66066001)(6486002)(2906002)(486006)(446003)(31696002)(8936002)(65806001)(8676002)(81156014)(81166006)(25786009)(476003)(5009440100003)(97736004)(230700001)(3846002)(6116002)(2616005)(956004)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0402MB2776; H:[10.232.14.39]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjZQUjA0MDJNQjI3NzY7MjM6NTkxbFkzZWZkOVk3MEhqVFk2NzdMUnd4?= =?utf-8?B?TjloNEFtU0hKR0c3Q3F1Z2UxWVN1cUJheU9zeS96UGk5OWFIanFadmtXSjQ0?= =?utf-8?B?UmJXTll3QVVkam5CMGg0MisrQ3hiVXJubGFVSEpTbU0xLzVFZHMxditUMDd3?= =?utf-8?B?ZUlML2FHbjhjbTZSL3Axd0RSY3hOLzQ3e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bYLeQZ4e1nWslYnCa8inApHX10= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0402MB2776; 7:JkIEnxWPYEPspNxozElIGU0qAW6nhIbZL49Uxn2r0Cx7dPC7HK9SWelcYlXw1JK7Bd9H/j7PtgPhh1uGOR4Z+mojP1LI2Ogmxh3/VC39uBGAL7LDPMGnj1P/1fNz45ZXYqfC6YzJms7VscBzgbSclJYld5gA4NFmCghjAFPk/7+yoAmsKEl1LluWcPEwieuiJ9wKCjLcB4dGj6oiyTgCn4PVzmSN/TxypiAn/zpkCFclxXtqIpangsZq2Jy3Fw5W X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2018 07:08:19.3847 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 039fdd5d-b8af-44ff-e2d7-08d59de8ad0b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0402MB2776 Subject: Re: [dpdk-dev] [PATCH 4/8] net/dpaa: fix the oob access 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: , X-List-Received-Date: Mon, 09 Apr 2018 07:08:21 -0000 On Thursday 05 April 2018 02:24 PM, Hemant Agrawal wrote: > Fixes: b21ed3e2a16d ("net/dpaa: support extended statistics") > Coverity issue: 268318 > Cc: stable@dpdk.org > > Signed-off-by: Hemant Agrawal > --- > drivers/net/dpaa/dpaa_ethdev.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c > index 0aad111..cbdc4f2 100644 > --- a/drivers/net/dpaa/dpaa_ethdev.c > +++ b/drivers/net/dpaa/dpaa_ethdev.c > @@ -339,6 +339,9 @@ dpaa_xstats_get_names(__rte_unused struct rte_eth_dev *dev, Definition of this function is: static int dpaa_xstats_get_names(__rte_unused struct rte_eth_dev *dev, struct rte_eth_xstat_name *xstats_names, __rte_unused unsigned int limit) > { > unsigned int i, stat_cnt = RTE_DIM(dpaa_xstats_strings); > > + if (limit < stat_cnt) > + return stat_cnt; As this patch is using the 'limit' argument, '__rte_unused' should be removed from the function arguments. > + > if (xstats_names != NULL) > for (i = 0; i < stat_cnt; i++) > snprintf(xstats_names[i].name, > @@ -366,7 +369,7 @@ dpaa_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids, > return 0; > > fman_if_stats_get_all(dpaa_intf->fif, values_copy, > - sizeof(struct dpaa_if_stats)); > + sizeof(struct dpaa_if_stats) / 8); > > for (i = 0; i < stat_cnt; i++) > values[i] = > Once the above is correct, please use: Acked-By: Shreyansh Jain