From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8AA99A0613 for ; Fri, 27 Sep 2019 12:40:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4CFD91BF0C; Fri, 27 Sep 2019 12:40:43 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 1EF3D1BF04 for ; Fri, 27 Sep 2019 12:40:40 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2019 03:40:40 -0700 X-IronPort-AV: E=Sophos;i="5.64,555,1559545200"; d="scan'208";a="193179042" Received: from dhunt5-mobl4.ger.corp.intel.com (HELO [10.237.221.113]) ([10.237.221.113]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/AES256-SHA; 27 Sep 2019 03:40:38 -0700 To: Ferruh Yigit , "Daly, Lee" , "'Hajkowski, MarcinX'" Cc: "dev@dpdk.org" References: <20190403171601.9788-1-marcinx.hajkowski@intel.com> <20190403171601.9788-5-marcinx.hajkowski@intel.com> From: "Hunt, David" Message-ID: <15963b6c-2f5e-bd27-ddd4-3ef46147822b@intel.com> Date: Fri, 27 Sep 2019 11:40:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH 4/4] power: add cmd to query CPU freq. 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" On 27/09/2019 11:19, Ferruh Yigit wrote: > On 9/27/2019 10:52 AM, Daly, Lee wrote: >> >>> -----Original Message----- >>> From: Hajkowski, MarcinX >>> Sent: Wednesday, April 3, 2019 6:16 PM >>> To: Hunt, David >>> Cc: dev@dpdk.org; Hajkowski, MarcinX >>> Subject: [PATCH 4/4] power: add cmd to query CPU freq. >>> >>> From: Marcin Hajkowski >>> >>> Add command and related logic to query CPU frequencies either for specified >>> CPU or all cores. >>> >>> Signed-off-by: Marcin Hajkowski >>> --- >>> .../guest_cli/vm_power_cli_guest.c | 150 ++++++++++++++++-- >>> 1 file changed, 138 insertions(+), 12 deletions(-) >>> >>> diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c >> <...> >> >>> + >>> + pkt.command = CPU_POWER_QUERY_FREQ_LIST; >>> + strcpy(pkt.vm_name, policy.vm_name); >> Can you use the internal rte_strlcpy() functions for security. > +1 to *not* use 'strcpy()', but better to use 'strlcpy()' directly, > since there is already a wrapper for the environment that doesn't support > 'strlcpy()' [1]. > > [1] lib/librte_eal/common/include/rte_string_fns.h > #define strlcpy(dst, src, size) rte_strlcpy(dst, src, size) Agreed, I'm currently working on a respin that uses strlcpy(). Will post soon. Rgds, Dave.