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: Jason Gunthorpe <jgg@ziepe.ca>
Date: 2021-01-19 13:11:24
Also in: linux-block, linux-rdma, lkml, target-devel

On Mon, Jan 18, 2021 at 08:27:09PM -0500, Douglas Gilbert wrote:
To protect against the "unsigned long long" length being too big why
not pick a large power of two and if someone can justify a larger
value, they can send a patch.

        if (length > 64ULL * 1024 * 1024 * 1024)
		return NULL;
That is not how we protect against arithemetic overflows in the kernel

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