Skip to content

Backport the one-arg k*alloc_obj() APIs

Eric Biggers linux-hardening stable 1 version Applied

Status from this message: Queued both fscrypt follow-ups for 6.18, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4slab: Introduce kmalloc_flex() and familyDocumentation/process/deprecated.rst include/linux/slab.h+49 -00 replies
2/4add default_gfp() helper macro and use it in the new *alloc_obj() helpersinclude/linux/gfp.h include/linux/slab.h+28 -240 replies
3/4default_gfp(): avoid using the "newfangled" __VA_OPT__ trickinclude/linux/gfp.h+2 -20 replies
4/4slab: recognize @GFP parameter as optional in kernel-docinclude/linux/slab.h+3 -31 reply

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchVlastimil BabkaRicardo RibaldaRichard FitzgeraldHarry Yoo (Oracle)
1/4A-b
2/4
3/4Reported-and-tested-by Reported-and-tested-by
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

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

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

Signature · 1 line
2.55.0