Skip to content

RFC slab: Allocate and use per-call-site caches

Kees Cook linux-hardening linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5slab: Introduce kmem_buckets_destroy()include/linux/slab.h mm/slab_common.c+15 -30 replies
2/5codetag: Run module_load hooks for builtin codetagslib/codetag.c+1 -42 replies
3/5codetag: Introduce codetag_early_walk()include/linux/codetag.h lib/codetag.c+18 -02 replies
4/5alloc_tag: Track fixed vs dynamic sized kmalloc callsinclude/linux/alloc_tag.h include/linux/slab.h lib/alloc_tag.c +1 more+50 -122 replies
5/5slab: Allocate and use per-call-site cachesinclude/linux/alloc_tag.h lib/alloc_tag.c mm/Kconfig +2 more+170 -105 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH 0/5] slab: Allocate and use per-call-site caches

Hi,

Here's my current progress on using per-call-site kmalloc caches (instead of KMALLOC_NORMAL), as a defense against the common heap-grooming attacks that construct malicious objects in the same cache as a target object.

I'd like to get feedback on the general approach before I continue with it. I've noted in the later patches what additional improvements I'd like to make. The first 3 patches are relatively small infrastructure changes.

Thanks!

-Kees

Kees Cook (5):
slab: Introduce kmem_buckets_destroy()
codetag: Run module_load hooks for builtin codetags
codetag: Introduce codetag_early_walk()
alloc_tag: Track fixed vs dynamic sized kmalloc calls
slab: Allocate and use per-call-site caches

 include/linux/alloc_tag.h |  38 +++++++++--
 include/linux/codetag.h   |   2 +
 include/linux/slab.h      |  17 ++---
 lib/alloc_tag.c           | 129 +++++++++++++++++++++++++++++++++++---
 lib/codetag.c             |  21 +++++--
 mm/Kconfig                |  25 ++++++++
 mm/slab_common.c          |  18 +++++-
 mm/slub.c                 |  31 ++++++++-
 8 files changed, 253 insertions(+), 28 deletions(-)
Signature · 1 line
2.34.1