mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] devres: Provide kmalloc_obj*-style API for devm_kmalloc
@ 2026-09-14 22:32 Kees Cook
  2026-09-14 22:32 ` [PATCH 1/2] mm: Move default_gfp() into gfp_types.h Kees Cook
  2026-09-14 22:32 ` [PATCH 2/2] devres: Provide kmalloc_obj*-style API for devm_kmalloc Kees Cook
  0 siblings, 2 replies; 5+ messages in thread
From: Kees Cook @ 2026-09-14 22:32 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Kees Cook, Lorenzo Stoakes, Rafael J. Wysocki, Danilo Krummrich,
	Andrew Morton, Vlastimil Babka, Suren Baghdasaryan, Michal Hocko,
	Brendan Jackman, Johannes Weiner, Zi Yan, David Hildenbrand,
	Liam R. Howlett, Mike Rapoport, Gustavo A. R. Silva,
	linux-kernel, driver-core, linux-mm, linux-hardening

Hi,

As a continuation of the type-based allocator work, this introduces the
wrappers for devm_kmalloc()-family to use the _obj/_objs/_flex API that
the kmalloc()-family has moved to. Along with the coming changes to
scripts/coccinelle/api/kmalloc_objs.cocci to support devm_kmalloc()
conversions, this will result in the following uses:

            6644    devm_kzalloc_obj()
            1714    devm_kzalloc_objs()
             296    devm_kzalloc_flex()
              89    devm_kmalloc_objs()
              83    devm_kmalloc_obj()
               2    devm_kmalloc_flex()

which totals out in diffstat to:

 5908 files changed, 10013 insertions(+), 12082 deletions(-)

-Kees

Kees Cook (2):
  mm: Move default_gfp() into gfp_types.h
  devres: Provide kmalloc_obj*-style API for devm_kmalloc

 include/linux/device/devres.h | 102 ++++++++++++++++++++++++++++++++++
 include/linux/gfp.h           |   4 --
 include/linux/gfp_types.h     |   4 ++
 3 files changed, 106 insertions(+), 4 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-09-15  6:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-14 22:32 [PATCH 0/2] devres: Provide kmalloc_obj*-style API for devm_kmalloc Kees Cook
2026-09-14 22:32 ` [PATCH 1/2] mm: Move default_gfp() into gfp_types.h Kees Cook
2026-09-15  2:13   ` Zi Yan
2026-09-15  6:56   ` Vlastimil Babka (SUSE)
2026-09-14 22:32 ` [PATCH 2/2] devres: Provide kmalloc_obj*-style API for devm_kmalloc Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®