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 425E11B4C0; Tue, 23 Apr 2019 10:35:14 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Apr 2019 01:35:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,385,1549958400"; d="scan'208";a="142838818" Received: from dhunt5-mobl2.ger.corp.intel.com (HELO [10.237.210.15]) ([10.237.210.15]) by fmsmga008.fm.intel.com with ESMTP; 23 Apr 2019 01:35:12 -0700 To: Thomas Monjalon Cc: dev@dpdk.org, stable@dpdk.org References: <20190410124910.24537-1-david.hunt@intel.com> <2785627.VT4d78UdPe@xps> <92c0a8fa-f05b-827b-a34b-5e403dd3177d@intel.com> <6104972.Lu9iTUo70n@xps> From: "Hunt, David" Message-ID: <21ffdc4f-ef85-1931-e192-4bf53b133bcb@intel.com> Date: Tue, 23 Apr 2019 09:35:12 +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: <6104972.Lu9iTUo70n@xps> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v1] examples/vm_power_manager: fix buffer overrun 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, 23 Apr 2019 08:35:14 -0000 On 23/4/2019 9:33 AM, Thomas Monjalon wrote: > 23/04/2019 10:21, Hunt, David: >> Hi Thomas, >> >> On 22/4/2019 10:54 PM, Thomas Monjalon wrote: >>> 10/04/2019 14:49, David Hunt: >>>> The freqs array in freq_info struct has RTE_MAX_LCORE_FREQS elements, >>>> yet the code can attemtp to look at the index at POWER_MANAGER_MAX_CPUS, >>>> which may be greater than RTE_MAX_LCORE_FREQS. Fix to limit index to >>>> RTE_MAX_LCORE_FREQS. >>>> >>>> Fixes: d26c18c93260 ("examples/vm_power: cpu frequency in host") >>>> Coverity issue: 337660 >>>> >>>> Signed-off-by: David Hunt >>> It seems to have been fixed in another patch, isn't it? >>> >> It was not fixed in another patch, although I can see the confusion. >> >> A previous patch made the #defines more consistent, and >> POWER_MGR_MAX_CPUS was changed to RTE_MAX_LCORE on the affected line. >> However, this was later revealed as a coverity issue, and was fixed in >> this patch to be RTE_LCORE_MAX_FREQS, which is the size of the array >> it's trying to index into. >> >> So looking at RC2, this patch is still needed. > I think it needs to be rebased in a v2 then. > Sure, will do. 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 460E3A05D3 for ; Tue, 23 Apr 2019 10:35:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1DB151B4D2; Tue, 23 Apr 2019 10:35:15 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 425E11B4C0; Tue, 23 Apr 2019 10:35:14 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Apr 2019 01:35:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,385,1549958400"; d="scan'208";a="142838818" Received: from dhunt5-mobl2.ger.corp.intel.com (HELO [10.237.210.15]) ([10.237.210.15]) by fmsmga008.fm.intel.com with ESMTP; 23 Apr 2019 01:35:12 -0700 To: Thomas Monjalon Cc: dev@dpdk.org, stable@dpdk.org References: <20190410124910.24537-1-david.hunt@intel.com> <2785627.VT4d78UdPe@xps> <92c0a8fa-f05b-827b-a34b-5e403dd3177d@intel.com> <6104972.Lu9iTUo70n@xps> From: "Hunt, David" Message-ID: <21ffdc4f-ef85-1931-e192-4bf53b133bcb@intel.com> Date: Tue, 23 Apr 2019 09:35:12 +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: <6104972.Lu9iTUo70n@xps> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v1] examples/vm_power_manager: fix buffer overrun 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: <20190423083512.pIkswNr5fem5QRU_2xuySqcjodxO7Wja1NQzOXk1_8c@z> On 23/4/2019 9:33 AM, Thomas Monjalon wrote: > 23/04/2019 10:21, Hunt, David: >> Hi Thomas, >> >> On 22/4/2019 10:54 PM, Thomas Monjalon wrote: >>> 10/04/2019 14:49, David Hunt: >>>> The freqs array in freq_info struct has RTE_MAX_LCORE_FREQS elements, >>>> yet the code can attemtp to look at the index at POWER_MANAGER_MAX_CPUS, >>>> which may be greater than RTE_MAX_LCORE_FREQS. Fix to limit index to >>>> RTE_MAX_LCORE_FREQS. >>>> >>>> Fixes: d26c18c93260 ("examples/vm_power: cpu frequency in host") >>>> Coverity issue: 337660 >>>> >>>> Signed-off-by: David Hunt >>> It seems to have been fixed in another patch, isn't it? >>> >> It was not fixed in another patch, although I can see the confusion. >> >> A previous patch made the #defines more consistent, and >> POWER_MGR_MAX_CPUS was changed to RTE_MAX_LCORE on the affected line. >> However, this was later revealed as a coverity issue, and was fixed in >> this patch to be RTE_LCORE_MAX_FREQS, which is the size of the array >> it's trying to index into. >> >> So looking at RC2, this patch is still needed. > I think it needs to be rebased in a v2 then. > Sure, will do.