Skip to content

RFC kmemleak: Add support for the bootmem allocator

Catalin Marinas linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3kmemleak: Allow partial freeing of memory blocksinclude/linux/kmemleak.h mm/kmemleak.c+54 -56 replies
2/3kmemleak: Add callbacks to the bootmem allocatormm/bootmem.c+29 -710 replies
3/3kmemleak: Remove alloc_bootmem annotations introduced in the pastkernel/pid.c mm/page_alloc.c+3 -181 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchPekka EnbergJohannes Weiner
1/3A-b A-b
2/3A-b A-b R-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 0/3] kmemleak: Add support for the bootmem allocator

Hi,

In the last few days, I went through of false positives reported by kmemleak and it turns out some of them were caused by not tracking alloc_bootmem* calls. Rather than adding more and more kmemleak annotations throughout the kernel, I decided to add support for tracking all the alloc_bootmem* and free_bootmem calls.

The latter may not have a corresponding alloc_bootmem* pair or it may only free part of a block. I changed kmemleak to support this usage.

Thanks for your feedback.

Catalin Marinas (3):
kmemleak: Remove alloc_bootmem annotations introduced in the past
kmemleak: Add callbacks to the bootmem allocator
kmemleak: Allow partial freeing of memory blocks

 include/linux/kmemleak.h |    4 +++
 kernel/pid.c             |    7 ------
 mm/bootmem.c             |   36 ++++++++++++++++++++++++------
 mm/kmemleak.c            |   55 ++++++++++++++++++++++++++++++++++++++++++----
 mm/page_alloc.c          |   14 +++---------
 5 files changed, 86 insertions(+), 30 deletions(-)
Signature · 7 lines
Catalin

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>