Hi, Here's a refresh and update on the kmalloc_obj() API proposal for discussion here and at LPC[1]. Please see patch 2 for the bulk of the details. And note that this is obviously not v6.19 material! :)
The tree-wide patch for conversions is here: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?h=dev/v6.18-rc6/alloc_obj/v5&id=f79ee96ad6a3cafdb274fe15d3ae067724e72327 Thanks! -Kees [1] https://lpc.events/event/19/contributions/2136/ v5: - switch to using assignment with type as first argument (Linus) - fix various comment, commit log, and kern-docs (Randy, Miguel) - renamed flex_counter internal helpers with "__" prefix (Przemek) v4: https://lore.kernel.org/lkml/[email protected]/ v3: https://lore.kernel.org/lkml/[email protected]/ v2: https://lore.kernel.org/lkml/[email protected]/ v1: https://lore.kernel.org/lkml/[email protected]/ Kees Cook (4): compiler_types: Introduce __flex_counter() and family slab: Introduce kmalloc_obj() and family checkpatch: Suggest kmalloc_obj family for sizeof allocations coccinelle: Add kmalloc_objs conversion script scripts/checkpatch.pl | 39 ++++- scripts/coccinelle/api/kmalloc_objs.cocci | 168 +++++++++++++++++++++ Documentation/process/deprecated.rst | 42 ++++++ include/linux/compiler_types.h | 31 ++++ include/linux/overflow.h | 40 +++++ include/linux/slab.h | 172 ++++++++++++++++++++++ 6 files changed, 486 insertions(+), 6 deletions(-) create mode 100644 scripts/coccinelle/api/kmalloc_objs.cocci -- 2.34.1
