Thread (21 messages) 21 messages, 4 authors, 2021-01-19

Re: [PATCH v6 1/4] sgl_alloc_order: remove 4 GiB limit, sgl_free() warning

From: Bodo Stroesser <bostroesser@gmail.com>
Date: 2021-01-19 18:57:43
Also in: linux-rdma, linux-scsi, lkml, target-devel

On 19.01.21 19:03, Jason Gunthorpe wrote:
On Tue, Jan 19, 2021 at 06:24:49PM +0100, Bodo Stroesser wrote:
quoted
I had a second look into math.h, but I don't find any reason why round_up
could overflow. Can you give a hint please?
#define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
                                                     ^^^^^

That +1 can overflow
But that would be a unsigned long long overflow. I considered this to
not be relevant.
It looks like it would not be so bad to implement some
check_round_up_overflow() if people prefer

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help