Re: [dpdk-dev] [PATCH v2] mem: fix the alloc size roundup overflow

2020-05-07 Thread Burakov, Anatoly
On 07-May-20 8:41 AM, Bing Zhao wrote: The size checking is done in the caller. The size parameter is an unsigned (64b wide) right now, so the comparison with zero should be enough in most cases. But it won't help in the following case. If the allocating request input a huge number by mistake, e.

[dpdk-dev] [PATCH v2] mem: fix the alloc size roundup overflow

2020-05-07 Thread Bing Zhao
The size checking is done in the caller. The size parameter is an unsigned (64b wide) right now, so the comparison with zero should be enough in most cases. But it won't help in the following case. If the allocating request input a huge number by mistake, e.g., some overflow after the calculation (

[dpdk-dev] [PATCH v2] mem: fix the alloc size roundup overflow

2020-05-07 Thread Bing Zhao
The size checking is done in the caller. The size parameter is an unsigned (64b wide) right now, so the comparison with zero should be enough in most cases. But it won't help in the following case. If the allocating request input a huge number by mistake, e.g., some overflow after the calculation (