[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230123170419.7292-1-george@enfabrica.net>
Date: Mon, 23 Jan 2023 11:04:10 -0600
From: George Prekas <george@...abrica.net>
To: linux-kernel@...r.kernel.org, linux-mm@...ck.org
Cc: Catalin Marinas <catalin.marinas@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Christoph Lameter <cl@...ux.com>,
Pekka Enberg <penberg@...nel.org>,
David Rientjes <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Vlastimil Babka <vbabka@...e.cz>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Hyeonggon Yoo <42.hyeyoo@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
Fenghua Yu <fenghua.yu@...el.com>,
Andrei Vagin <avagin@...il.com>,
George Prekas <george@...abrica.net>
Subject: [PATCH 0/9] mm: kmemleak: fix unreported memory leaks
Fix a couple of issues with kmemleak that lead to missed (not reported)
leaks. Parts of the kernel keep references to allocated objects which
are not properly communicated to kmemleak. This causes kmemleak to fail
to report some memory leaks.
I have also written a kmemleak test. It is a userspace Python script
and a device driver that communicate over ioctl, allocate and free
memory and verify that memory leaks are reported correctly. You can find
it here:
https://gist.github.com/george-enf/2d7cc288202b94defbe253f4ca26357b
George Prekas (9):
mm: kmemleak: properly disable task stack scanning
Revert "mm/kmemleak: make create_object return void"
mm: kmemleak: propagate NO_SCAN flag in delete_object_part
mm: kmemleak: add kmemleak_noscan_phys function
mm: kmemleak: do not scan sparsemap_buf
mm: kmemleak: do not scan cpu_cache of struct kmem_cache
mm: kmemleak: erase page->s_mem in slab_destroy
mm: kmemleak: erase page->freelist in slab_destroy
mm: kmemleak: fix undetected leaks for page aligned objects
include/linux/kmemleak.h | 5 ++
kernel/fork.c | 3 ++
mm/kmemleak.c | 98 ++++++++++++++++++++++++++--------------
mm/slab.c | 20 +++-----
mm/slab.h | 7 ++-
mm/sparse.c | 3 ++
6 files changed, 88 insertions(+), 48 deletions(-)
--
2.37.1
Powered by blists - more mailing lists