llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/4] slab: Introduce kmalloc_obj() and family
@ 2025-11-22  1:42 Kees Cook
  2025-11-22  1:42 ` [PATCH v5 1/4] compiler_types: Introduce __flex_counter() " Kees Cook
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Kees Cook @ 2025-11-22  1:42 UTC (permalink / raw)
  To: Vlastimil Babka
  Cc: Kees Cook, Randy Dunlap, Miguel Ojeda, Przemek Kitszel,
	Gustavo A. R. Silva, Linus Torvalds, Matthew Wilcox,
	Christoph Lameter, Marco Elver, Vegard Nossum, Pekka Enberg,
	David Rientjes, Joonsoo Kim, Andrew Morton, Roman Gushchin,
	Harry Yoo, Bill Wendling, Justin Stitt, Jann Horn,
	Greg Kroah-Hartman, Sasha Levin, linux-mm, Nathan Chancellor,
	Peter Zijlstra, Nick Desaulniers, Jonathan Corbet, Jakub Kicinski,
	Yafang Shao, Tony Ambardar, Alexander Lobakin, Jan Hendrik Farr,
	Alexander Potapenko, linux-kernel, linux-hardening, linux-doc,
	llvm

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/20250315025852.it.568-kees@kernel.org/
 v3: https://lore.kernel.org/lkml/20240822231324.make.666-kees@kernel.org/
 v2: https://lore.kernel.org/lkml/20240807235433.work.317-kees@kernel.org/
 v1: https://lore.kernel.org/lkml/20240719192744.work.264-kees@kernel.org/

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-11-24 12:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-22  1:42 [PATCH v5 0/4] slab: Introduce kmalloc_obj() and family Kees Cook
2025-11-22  1:42 ` [PATCH v5 1/4] compiler_types: Introduce __flex_counter() " Kees Cook
2025-11-22  1:42 ` [PATCH v5 2/4] slab: Introduce kmalloc_obj() " Kees Cook
2025-11-22 19:53   ` Linus Torvalds
2025-11-22 20:54     ` Linus Torvalds
2025-11-22  1:42 ` [PATCH v5 3/4] checkpatch: Suggest kmalloc_obj family for sizeof allocations Kees Cook
2025-11-22  4:51   ` Joe Perches
2025-11-22  1:43 ` [PATCH v5 4/4] coccinelle: Add kmalloc_objs conversion script Kees Cook
2025-11-24 12:50   ` [cocci] " Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).