Re: [PATCH] mm, slab: don't wrap internal functions with alloc_hooks()

From: Kees Cook
Date: Fri May 24 2024 - 19:26:50 EST


On Wed, May 22, 2024 at 11:50:37AM +0200, Vlastimil Babka wrote:
> The functions __kmalloc_noprof(), kmalloc_large_noprof(),
> kmalloc_trace_noprof() and their _node variants are all internal to the
> implementations of kmalloc_noprof() and kmalloc_node_noprof() and are
> only declared in the "public" slab.h and exported so that those
> implementations can be static inline and distinguish the build-time
> constant size variants. The only other users for some of the internal
> functions are slub_kunit and fortify_kunit tests which make very
> short-lived allocations.

If it's only internal, I'm happy to drop it from fortify_kunit.

-Kees

--
Kees Cook