]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: kmemleak: add support for dumping physical and __percpu object info
authorCatalin Marinas <catalin.marinas@arm.com>
Thu, 6 Feb 2025 11:45:36 +0000 (11:45 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 28 Feb 2025 00:59:51 +0000 (16:59 -0800)
commit5ac880a13f134aa0c953954771fd7c34d2d05086
tree9a239939942da5fa54ad95a88e19297f489cdec6
parente1cc0296b233a347b804e29a22f2153a20c417e5
mm: kmemleak: add support for dumping physical and __percpu object info

Patch series "mm: kmemleak: Usability improvements".

Following a recent false positive tracking that led to commit 488b5b9eca68
("mm: kmemleak: fix upper boundary check for physical address objects"), I
needed kmemleak to give me more debug information about the objects it is
tracking.  This lead to the first patch of this series.  The second patch
changes the kmemleak-test module to show the raw pointers for debugging
purposes.

This patch (of 2):

Currently, echo dump=...  > /sys/kernel/debug/kmemleak only looks up the
main virtual address object tree.  However, for debugging, it's useful to
dump information about physical address and __percpu objects.

Search all three object trees for the dump= command and also print the
type of the object if not virtual: "(phys)" or "(percpu)".  In addition,
allow search by alias (pointer within the object).

Link: https://lkml.kernel.org/r/20250206114537.2597764-1-catalin.marinas@arm.com
Link: https://lkml.kernel.org/r/20250206114537.2597764-2-catalin.marinas@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/kmemleak.c