mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next v5 0/7] net: skb: isolate skb data area allocations into a separate bucket
@ 2026-10-02 23:11 Kees Cook
  2026-10-02 23:11 ` [PATCH net-next v5 1/7] mm/slab: Mark the kmem_buckets_create() context as a Context: section Kees Cook
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Kees Cook @ 2026-10-02 23:11 UTC (permalink / raw)
  To: Vlastimil Babka
  Cc: Kees Cook, Pedro Falcato, Harry Yoo (Meta),
	David S. Miller, Andrew Morton, Hao Li, Christoph Lameter,
	David Rientjes, Roman Gushchin, Johannes Weiner, Michal Hocko,
	Shakeel Butt, Muchun Song, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Simon Horman, Jason Xing, Willem de Bruijn,
	Mina Almasry, Björn Töpel, Jiayuan Chen,
	Kuniyuki Iwashima, linux-kernel, linux-mm, cgroups, netdev,
	linux-hardening

Hi!

This gets the buckets able to handle memcg (GFP_KERNEL_ACCOUNT) with
isolation (since it's common due to AF_UNIX), and GFP_DMA with fall back
(since it's rare). It gave me an excuse to build out bucket kunit tests
too, and that (and LLM review) found a couple other issues that needed
fixing too.

The bulk of this is mm/slab, but the final patch is netdev, which Paolo
acked in v4, so I'm hoping this whole series can go via slab?

Thanks!

-Kees

 v5:
 - 2/7: kmem_buckets_create() and kmem_buckets_create_types() take an
   alignment, where kmem_cache_create() has it; 0 keeps v4's behaviour,
   the alignment of the kmalloc cache being mirrored. All callers pass 0.
   New subject: "mm/slab: Let kmem_buckets_create() take an alignment"
   (Harry)
 - 4/7: test that an explicit alignment is honored.
 - 5/7: export mem_cgroup_kmem_disabled() for KUnit only, fixing a
   modular build of slub_kunit (Harry).
 - 6/7: commit log shows the per-set cost of indexing rows by
   kmalloc_cache_type; test that an explicit alignment reaches the
   accounted row too.
 - 7/7: pass the new alignment argument.
 - Collected tags on 1/7 (Harry, Pedro, Hao) and 7/7 (Paolo).
 - v4..v5 diff: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/diff/?id=dev/v7.3-rc2/skb-buckets/v5&id2=dev/v7.3-rc2/skb-buckets/v4
 v4: https://lore.kernel.org/all/20260921075811.too.775-kees@kernel.org/
 v3: https://lore.kernel.org/all/20260702170728.168755-1-pfalcato@suse.de/


Kees Cook (6):
  mm/slab: Mark the kmem_buckets_create() context as a Context: section
  mm/slab: Let kmem_buckets_create() take an alignment
  mm/slab: Add kmem_buckets_destroy()
  mm/slab: Add tests for the existing kmem_buckets behaviour
  mm/slab: Provide kmalloc type fallback for bucket allocations
  mm/slab: Let a bucket set handle __GFP_ACCOUNT

Pedro Falcato (1):
  net: skb: isolate skb data area allocations into a separate bucket

 include/linux/slab.h   |  66 ++++++-
 mm/slab.h              |  44 ++++-
 ipc/msgutil.c          |   2 +-
 lib/tests/slub_kunit.c | 397 +++++++++++++++++++++++++++++++++++++++++
 mm/memcontrol.c        |   2 +
 mm/slab_common.c       | 173 +++++++++++++++---
 mm/util.c              |   2 +-
 net/core/skbuff.c      |  11 +-
 8 files changed, 663 insertions(+), 34 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-10-02 23:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-02 23:11 [PATCH net-next v5 0/7] net: skb: isolate skb data area allocations into a separate bucket Kees Cook
2026-10-02 23:11 ` [PATCH net-next v5 1/7] mm/slab: Mark the kmem_buckets_create() context as a Context: section Kees Cook
2026-10-02 23:11 ` [PATCH net-next v5 2/7] mm/slab: Let kmem_buckets_create() take an alignment Kees Cook
2026-10-02 23:11 ` [PATCH net-next v5 3/7] mm/slab: Add kmem_buckets_destroy() Kees Cook
2026-10-02 23:11 ` [PATCH net-next v5 4/7] mm/slab: Add tests for the existing kmem_buckets behaviour Kees Cook
2026-10-02 23:11 ` [PATCH net-next v5 5/7] mm/slab: Provide kmalloc type fallback for bucket allocations Kees Cook
2026-10-02 23:11 ` [PATCH net-next v5 6/7] mm/slab: Let a bucket set handle __GFP_ACCOUNT Kees Cook
2026-10-02 23:11 ` [PATCH net-next v5 7/7] net: skb: isolate skb data area allocations into a separate bucket 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®