lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 28 Feb 2022 14:30:11 +0000
From:   Matthew Wilcox <>
To:     Marco Elver <>
Cc:     Kees Cook <>,,
        Pekka Enberg <>,
        David Rientjes <>,
        Joonsoo Kim <>,
        Andrew Morton <>,
        Vlastimil Babka <>,,,
        Greg Kroah-Hartman <>,
        "Rafael J. Wysocki" <>,
        Christoph Lameter <>,
        Nathan Chancellor <>,
        Nick Desaulniers <>,
        Daniel Micay <>,,
Subject: Re: [PATCH] mm: Handle ksize() vs __alloc_size by forgetting size

On Mon, Feb 28, 2022 at 12:24:51PM +0100, Marco Elver wrote:
> 2. Somehow statically computing the size-class's size (kmalloc_index()
> might help here), removing __alloc_size from allocation functions and
> instead use some wrapper.

I don't think that's computable.  I have been thinking about a slab flag
that would say "speed is more important than size; if the smallest slab
for this size of allocation has no free objects, search larger slabs
to get memory instead of allocating a new slab".  If we did have such
a feature, it would be impossible to know how large ksize() would report.

Powered by blists - more mailing lists