aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorVlastimil Babka <[email protected]>2024-05-27 11:01:28 +0200
committerVlastimil Babka <[email protected]>2024-05-28 09:27:50 +0200
commita0a44d9175b349df2462089140fb7f292100bd7c (patch)
tree20faa4951a20f8bd2a47e662c108fc897b59a148 /lib/test_fortify/write_overflow-strncpy-src.c
parent1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 (diff)
mm, slab: don't wrap internal functions with alloc_hooks()
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. Therefore we can stop wrapping them with the alloc_hooks() macro. Instead add a __ prefix to all of them and a comment documenting these as internal. Also rename __kmalloc_trace() to __kmalloc_cache() which is more descriptive - it is a variant of __kmalloc() where the exact kmalloc cache has been already determined. The usage in fortify_kunit can be removed completely, as the internal functions should be tested already through kmalloc() tests in the test variant that passes non-constant allocation size. Reported-by: Kent Overstreet <[email protected]> Cc: Suren Baghdasaryan <[email protected]> Cc: Kees Cook <[email protected]> Reviewed-by: Kent Overstreet <[email protected]> Acked-by: David Rientjes <[email protected]> Signed-off-by: Vlastimil Babka <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions