~/talk

type-based slab allocation: kmalloc_obj family

Talkat Linux Plumbers Conference 2025 · 2025-12-11..12-13
slides:none on file

Proposal changes slab allocator to be type-aware by introducing kmalloc_obj() v4/v5 so allocations return typed pointers instead of void, and it converts the ~20,000 kmalloc callsites while uncovering about six real type mismatches. It implements automatic flexible-array counter assignment (signed counters map negative to zero for safety), simplifies macros from large complex expansions to two-line forms, covers kmalloc/kv wrappers now and leaves devm_kmalloc as an extension to implement.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 1:26Type safety benefits
  3. 3:13Flexible array counters
  4. 6:03Signed counters and security
  5. 7:48Simplified macros and cleanup
  6. 9:33Page allocator vs slab allocator
  7. 10:59Encouraging typed allocations
  8. 12:46Callbacks and void pointers
  9. 14:14Q&A and wrap-up
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.