Skip to content

Kernel memory leak detector

Catalin Marinas linux-next lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 27 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14kmemleak: Add the base supportinclude/linux/kmemleak.h init/main.c mm/kmemleak.c+1567 -110 replies
2/14kmemleak: Add documentation on the memory leak detectorDocumentation/kernel-parameters.txt Documentation/kmemleak.txt+146 -01 reply
3/14kmemleak: Add the slab memory allocation/freeing hooksinclude/linux/slab.h mm/slab.c+33 -21 reply
4/14kmemleak: Add the slob memory allocation/freeing hooksmm/slob.c+11 -40 replies
5/14kmemleak: Add the slub memory allocation/freeing hooksmm/slub.c+4 -11 reply
6/14kmemleak: Add the vmalloc memory allocation/freeing hooksmm/vmalloc.c+25 -30 replies
7/14kmemleak: Add kmemleak_alloc callback from alloc_large_system_hashmm/page_alloc.c+11 -00 replies
8/14kmemleak: Add modules supportkernel/module.c+56 -00 replies
9/14x86: Provide _sdata in the vmlinux_*.lds.S filesarch/x86/kernel/vmlinux_32.lds.S arch/x86/kernel/vmlinux_64.lds.S+2 -00 replies
10/14arm: Provide _sdata and __bss_stop in the vmlinux.lds.S filearch/arm/kernel/vmlinux.lds.S+2 -00 replies
11/14kmemleak: Remove some of the kmemleak false positivesdrivers/char/vt.c include/linux/percpu.h+12 -02 replies
12/14kmemleak: Enable the building of the memory leak detectorlib/Kconfig.debug mm/Makefile+23 -00 replies
13/14kmemleak: Simple testing module for kmemleaklib/Kconfig.debug mm/Makefile mm/kmemleak-test.c+123 -00 replies
14/14kmemleak: Add the corresponding MAINTAINERS entryMAINTAINERS+6 -00 replies

Reviews trailers per patch

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

PatchPaul E. McKenneyMatt MackallPekka Enberg
1/14R-b A-b
2/14
3/14R-b
4/14A-b A-b
5/14R-b
6/14
7/14
8/14
9/14
10/14
11/14
12/14
13/14
14/14

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

Read the v1 thread

Cover letter [PATCH 00/14] Kernel memory leak detector

A new kmemleak version is available. Thanks to all who reviewed the code and provided feedback. Kmemleak can also be found on this git tree:

git://linux-arm.org/linux-2.6.git kmemleak

Main changes since the previous release:

- run-time configuration by writing to the /sys/kernel/debug/memleak file (see Documentation/kmemleak.txt)
- boot-time disabling by passing kmemleak=off
- no scanning of the array_cache structures in slab to avoid false negatives
- aesthetic change - s/memleak/kmemleak for all the functions as it is more consistent with the documentation
- various other changes following comments received

Thanks for your comments.

Catalin Marinas (14):
kmemleak: Add the corresponding MAINTAINERS entry
kmemleak: Simple testing module for kmemleak
kmemleak: Enable the building of the memory leak detector
kmemleak: Remove some of the kmemleak false positives
arm: Provide _sdata and __bss_stop in the vmlinux.lds.S file
x86: Provide _sdata in the vmlinux_*.lds.S files
kmemleak: Add modules support
kmemleak: Add kmemleak_alloc callback from alloc_large_system_hash
kmemleak: Add the vmalloc memory allocation/freeing hooks
kmemleak: Add the slub memory allocation/freeing hooks
kmemleak: Add the slob memory allocation/freeing hooks
kmemleak: Add the slab memory allocation/freeing hooks
kmemleak: Add documentation on the memory leak detector
kmemleak: Add the base support

 Documentation/kernel-parameters.txt |    4 
 Documentation/kmemleak.txt          |  142 +++
 MAINTAINERS                         |    6 
 arch/arm/kernel/vmlinux.lds.S       |    2 
 arch/x86/kernel/vmlinux_32.lds.S    |    1 
 arch/x86/kernel/vmlinux_64.lds.S    |    1 
 drivers/char/vt.c                   |    7 
 include/linux/kmemleak.h            |   96 ++
 include/linux/percpu.h              |    5 
 include/linux/slab.h                |    2 
 init/main.c                         |    4 
 kernel/module.c                     |   56 +
 lib/Kconfig.debug                   |   33 +
 mm/Makefile                         |    2 
 mm/kmemleak-test.c                  |  111 +++
 mm/kmemleak.c                       | 1468 +++++++++++++++++++++++++++++++++++
 mm/page_alloc.c                     |   11 
 mm/slab.c                           |   33 +
 mm/slob.c                           |   15 
 mm/slub.c                           |    5 
 mm/vmalloc.c                        |   28 +
 21 files changed, 2021 insertions(+), 11 deletions(-)
 create mode 100644 Documentation/kmemleak.txt
 create mode 100644 include/linux/kmemleak.h
 create mode 100644 mm/kmemleak-test.c
 create mode 100644 mm/kmemleak.c
Signature · 1 line
Catalin