From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 6E6F3A0096 for ; Tue, 9 Apr 2019 16:40:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 263C64F91; Tue, 9 Apr 2019 16:40:24 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 1D0424F90 for ; Tue, 9 Apr 2019 16:40:22 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Apr 2019 07:40:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,329,1549958400"; d="scan'208";a="336300645" Received: from dhunt5-mobl2.ger.corp.intel.com (HELO [10.237.210.31]) ([10.237.210.31]) by fmsmga005.fm.intel.com with ESMTP; 09 Apr 2019 07:40:18 -0700 To: "Burakov, Anatoly" , dev@dpdk.org References: <20190409092201.7886-1-david.hunt@intel.com> <601a96fa-1a3e-9d98-8d78-df96c4ebd400@intel.com> From: "Hunt, David" Message-ID: Date: Tue, 9 Apr 2019 15:40:17 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <601a96fa-1a3e-9d98-8d78-df96c4ebd400@intel.com> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v1] lib/power: fix buffer overrun coverity issues 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" Message-ID: <20190409144017.GP2yG0v7QUnXMcqnx5Il9y90zKXYMAvjN33Afzas9Uk@z> On 9/4/2019 12:18 PM, Burakov, Anatoly wrote: > On 09-Apr-19 10:22 AM, David Hunt wrote: >> A previous change removed the limit of 64 cores by >> moving away from 64-bit masks to char arrays. However >> this left a buffer overrun issue, where the max channels >> was defined as 64, and max cores was defined as 256. These >> should all be consistently set to RTE_MAX_LCORE. >> >> The #defines being removed are CHANNEL_CMDS_MAX_CPUS, >> CHANNEL_CMDS_MAX_CHANNELS, POWER_MGR_MAX_CPUS, and >> CHANNEL_CMDS_MAX_VM_CHANNELS, and are being replaced >> with RTE_MAX_LCORE for consistency and simplicity. >> >> Fixes: fd73630e95c1 ("examples/power: change 64-bit masks to arrays") >>      Coverity issue: 337672 >> Fixes: fd73630e95c1 ("examples/power: change 64-bit masks to arrays") >>      Coverity issue: 337673 >> Fixes: fd73630e95c1 ("examples/power: change 64-bit masks to arrays") >>      Coverity issue: 337678 > > No need to mention the same commit three times :) > The coverity output said to add this, so I was leaving nothing to chance... :)