[PATCH] ethdev: fix 32-bit build with GCC-13

Ferruh Yigit ferruh.yigit at amd.com
Wed Nov 1 17:57:04 CET 2023


On 11/1/2023 8:12 AM, Ori Kam wrote:
> Hi
> 
>> -----Original Message-----
>> From: Ruifeng Wang <ruifeng.wang at arm.com>
>> Sent: Wednesday, November 1, 2023 9:16 AM
>>
>> aarch32 build with gcc-13.0.1 generated following warning:
>>
>> In function 'memcpy',
>>     inlined from 'rte_memcpy' at
>> ../lib/eal/arm/include/rte_memcpy_32.h:296:9,
>>     inlined from 'rte_flow_conv_action_conf' at ../lib/ethdev/rte_flow.c:726:20,
>>     inlined from 'rte_flow_conv_actions' at ../lib/ethdev/rte_flow.c:936:10:
>> warning: '__builtin_memcpy' specified bound 4294967264 exceeds maximum
>> object size 2147483647 [-Wstringop-overflow=]
>>
>> The issue is due to possible wrapping in unsigned arithmetic.
>> The 'size' can be 0. 'off' is 32. When 'tmp' is equal to (unsigned)-32,
>> the copy length is more than half the address space. Hence the warning.
>>
>> Casted variables to 64-bit to avoid wrapping.
>>
>> Fixes: 063911ee1df4 ("ethdev: add flow API object converter")
>> Cc: stable at dpdk.org
>>
>> Reported-by: Luca Boccassi <bluca at debian.org>
>> Signed-off-by: Ruifeng Wang <ruifeng.wang at arm.com>
>>>
> Acked-by: Ori Kam <orika at nvidia.com>
> 

Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>

Applied to dpdk-next-net/main, thanks.



More information about the stable mailing list