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 <[email protected]>
>> Cc: [email protected]; Hajkowski, MarcinX <[email protected]>
>> Subject: [PATCH 4/4] power: add cmd to query CPU freq.
>>
>> From: Marcin Hajkowski <[email protected]>
>>
>> Add command and related logic to query CPU frequencies either for specified
>> CPU or all cores.
>>
>> Signed-off-by: Marcin Hajkowski <[email protected]>
>> ---
>>  .../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)

> 
> Add my tag after small change above has been applied to all instances of 
> strcpy() in patchset.
> For all in series:
> Acked-by: Lee Daly <[email protected]>
> 

Reply via email to