|
|
Log in / Subscribe / Register

slab: Introduce kmalloc_obj() and family

From:  Kees Cook <kees-AT-kernel.org>
To:  Vlastimil Babka <vbabka-AT-suse.cz>
Subject:  [PATCH v4 0/2] slab: Introduce kmalloc_obj() and family
Date:  Fri, 14 Mar 2025 20:15:43 -0700
Message-ID:  <20250315025852.it.568-kees@kernel.org>
Cc:  Kees Cook <kees-AT-kernel.org>, Miguel Ojeda <ojeda-AT-kernel.org>, "Gustavo A. R. Silva" <gustavoars-AT-kernel.org>, Nathan Chancellor <nathan-AT-kernel.org>, Peter Zijlstra <peterz-AT-infradead.org>, Nick Desaulniers <nick.desaulniers+lkml-AT-gmail.com>, Marco Elver <elver-AT-google.com>, Przemek Kitszel <przemyslaw.kitszel-AT-intel.com>, Christoph Lameter <cl-AT-linux.com>, Pekka Enberg <penberg-AT-kernel.org>, David Rientjes <rientjes-AT-google.com>, Joonsoo Kim <iamjoonsoo.kim-AT-lge.com>, Andrew Morton <akpm-AT-linux-foundation.org>, Roman Gushchin <roman.gushchin-AT-linux.dev>, Hyeonggon Yoo <42.hyeyoo-AT-gmail.com>, Bill Wendling <morbo-AT-google.com>, Justin Stitt <justinstitt-AT-google.com>, Jann Horn <jannh-AT-google.com>, Linus Torvalds <torvalds-AT-linux-foundation.org>, Greg Kroah-Hartman <gregkh-AT-linuxfoundation.org>, Sasha Levin <sashal-AT-kernel.org>, Jonathan Corbet <corbet-AT-lwn.net>, Jakub Kicinski <kuba-AT-kernel.org>, Yafang Shao <laoar.shao-AT-gmail.com>, Tony Ambardar <tony.ambardar-AT-gmail.com>, Alexander Lobakin <aleksander.lobakin-AT-intel.com>, Jan Hendrik Farr <kernel-AT-jfarr.cc>, Alexander Potapenko <glider-AT-google.com>, linux-kernel-AT-vger.kernel.org, linux-hardening-AT-vger.kernel.org, linux-mm-AT-kvack.org, linux-doc-AT-vger.kernel.org, llvm-AT-lists.linux.dev
Archive-link:  Article

Hi,

Here's a refresh and update on the kmalloc_obj() API proposal. Please
see patch 2 for the specific details. And note that this is obviously
not v6.15 material! :)

Thanks!

-Kees

 v4:
 - split __flex_counter() out and add appropriate helpers
 - add flex array examples to commit log
 - add "size" details to commit log
 - add treewide conversion details to commit log
 - improve treewide Coccinelle scripting
 - fix documentation typos
 v3: https://lore.kernel.org/lkml/20240822231324.make.666-kees...
 v2: https://lore.kernel.org/lkml/20240807235433.work.317-kees...
 v1: https://lore.kernel.org/lkml/20240719192744.work.264-kees...

Kees Cook (2):
  compiler_types: Introduce __flex_counter() and family
  slab: Introduce kmalloc_obj() and family

 Documentation/process/deprecated.rst |  42 +++++++
 include/linux/compiler_types.h       |  31 +++++
 include/linux/overflow.h             |  36 ++++++
 include/linux/slab.h                 | 170 +++++++++++++++++++++++++++
 4 files changed, 279 insertions(+)

-- 
2.34.1




Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds