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  linux-cve-announce  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, 13 Nov 2023 20:07:28 -0800
From:   Kees Cook <>
To:     Vlastimil Babka <>
Cc:     David Rientjes <>,
        Christoph Lameter <>,
        Pekka Enberg <>,
        Joonsoo Kim <>,
        Andrew Morton <>,
        Hyeonggon Yoo <>,
        Roman Gushchin <>,,,,
        Andrey Ryabinin <>,
        Alexander Potapenko <>,
        Andrey Konovalov <>,
        Dmitry Vyukov <>,
        Vincenzo Frascino <>,
        Marco Elver <>,
        Johannes Weiner <>,
        Michal Hocko <>,
        Shakeel Butt <>,
        Muchun Song <>,,
Subject: Re: [PATCH 16/20] mm/slab: move kmalloc_slab() to mm/slab.h

On Mon, Nov 13, 2023 at 08:13:57PM +0100, Vlastimil Babka wrote:
> In preparation for the next patch, move the kmalloc_slab() function to
> the header, as it will have callers from two files, and make it inline.
> To avoid unnecessary bloat, remove all size checks/warnings from
> kmalloc_slab() as they just duplicate those in callers, especially after
> recent changes to kmalloc_size_roundup(). We just need to adjust handling
> of zero size in __do_kmalloc_node(). Also we can stop handling NULL
> result from kmalloc_slab() there as that now cannot happen (unless
> called too early during boot).
> The size_index array becomes visible so rename it to a more specific
> kmalloc_size_index.
> Signed-off-by: Vlastimil Babka <>

Yeah, removing the redundant size checks does make this nicer to look at. :)

Reviewed-by: Kees Cook <>

Kees Cook

Powered by blists - more mailing lists