Re: [PATCH 06/25] slab: make kmem_cache_create() work with 32-bit sizes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 6 Mar 2018 12:37:49 -0600 (CST) Christopher Lameter <cl@xxxxxxxxx> wrote:

> On Mon, 5 Mar 2018, Alexey Dobriyan wrote:
> 
> > struct kmem_cache::size and ::align were always 32-bit.
> >
> > Out of curiosity I created 4GB kmem_cache, it oopsed with division by 0.
> > kmem_cache_create(1UL<<32+1) created 1-byte cache as expected.
> 
> Could you add a check to avoid that in the future?
> 
> > size_t doesn't work and never did.
> 
> Its not so simple. Please verify that the edge cases of all object size /
> alignment etc calculations are doable with 32 bit entities first.
> 
> And size_t makes sense as a parameter.

Alexey, please don't let this stuff dangle on.

I think I'll merge this as-is but some fixups might be needed as a
result of Christoph's suggestion?




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux