From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id B077D4D27 for ; Tue, 9 Apr 2019 13:18:35 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Apr 2019 04:18:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,329,1549958400"; d="scan'208";a="129834533" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.134]) ([10.237.220.134]) by orsmga007.jf.intel.com with ESMTP; 09 Apr 2019 04:18:33 -0700 To: David Hunt , dev@dpdk.org References: <20190409092201.7886-1-david.hunt@intel.com> From: "Burakov, Anatoly" Message-ID: <601a96fa-1a3e-9d98-8d78-df96c4ebd400@intel.com> Date: Tue, 9 Apr 2019 12:18:32 +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: <20190409092201.7886-1-david.hunt@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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: , X-List-Received-Date: Tue, 09 Apr 2019 11:18:36 -0000 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 :) > > Signed-off-by: David Hunt > --- Acked-by: Anatoly Burakov -- Thanks, Anatoly 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 DD8D7A0096 for ; Tue, 9 Apr 2019 13:18:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 33CF44F94; Tue, 9 Apr 2019 13:18:38 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id B077D4D27 for ; Tue, 9 Apr 2019 13:18:35 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Apr 2019 04:18:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,329,1549958400"; d="scan'208";a="129834533" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.134]) ([10.237.220.134]) by orsmga007.jf.intel.com with ESMTP; 09 Apr 2019 04:18:33 -0700 To: David Hunt , dev@dpdk.org References: <20190409092201.7886-1-david.hunt@intel.com> From: "Burakov, Anatoly" Message-ID: <601a96fa-1a3e-9d98-8d78-df96c4ebd400@intel.com> Date: Tue, 9 Apr 2019 12:18:32 +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: <20190409092201.7886-1-david.hunt@intel.com> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 7bit 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: <20190409111832.0p6zA0POzYllEkVdGlOnRF35be-z1Mod4S5RviT-fes@z> 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 :) > > Signed-off-by: David Hunt > --- Acked-by: Anatoly Burakov -- Thanks, Anatoly