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

2020-04-20 Thread Bing Zhao
> -Original Message- > From: Burakov, Anatoly > Sent: Monday, April 20, 2020 7:40 PM > To: Bing Zhao > Cc: dev@dpdk.org; sergio.gonzalez.mon...@intel.com; > sta...@dpdk.org > Subject: Re: [PATCH] mem: fix the alloc size roundup overflow > > On 07-Apr-20 11:46 AM, Bing Zhao wrote: > > The

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

2020-04-20 Thread Burakov, Anatoly
On 07-Apr-20 11:46 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] mem: fix the alloc size roundup overflow

2020-04-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 (