[PATCH 6.18 0/4] Backport the one-arg k*alloc_obj() APIs

Eric Biggers <[email protected]>
Newsgroups org.kernel.vger.linux-hardening,org.kernel.vger.stable
Message-ID <[email protected]>
Two of my recent commits failed to build when cherry-picked to 6.18
solely because of their use of kzalloc_obj(size).  The two-argument
kzalloc_obj(size, gfp) was already backported to 6.18, but not the
one-argument "overload".

It seems likely that this is a very common issue.  These are core kernel
APIs that almost everyone uses.

Thus, this series adds the single-argument version to 6.18, in a
backport-friendly way by omitting the flex counter support.

After this is applied, dd015b566d50 and 696c030e1e34 will be clean
cherry-picks, so please cherry-pick those afterwards.

Kees Cook (1):
  slab: Introduce kmalloc_flex() and family

Linus Torvalds (2):
  add default_gfp() helper macro and use it in the new *alloc_obj()
    helpers
  default_gfp(): avoid using the "newfangled" __VA_OPT__ trick

Randy Dunlap (1):
  slab: recognize @GFP parameter as optional in kernel-doc

 Documentation/process/deprecated.rst |  7 +++
 include/linux/gfp.h                  |  4 ++
 include/linux/slab.h                 | 78 +++++++++++++++++++++-------
 3 files changed, 71 insertions(+), 18 deletions(-)


base-commit: e46dc0adfe39724bcf52cea47b8f9c9aed86a394
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.