]> www.infradead.org Git - nvme.git/commit
module: Refine kmemleak scanned areas
authorVincent Donnefort <vdonnefort@google.com>
Tue, 10 Sep 2024 07:31:23 +0000 (08:31 +0100)
committerLuis Chamberlain <mcgrof@kernel.org>
Fri, 13 Sep 2024 16:55:17 +0000 (09:55 -0700)
commitb319cea80539df9bea0ad98cb5e4b2fcb7e1a34b
tree735522d9b3962ff31660e72dda8451e157d9cc5a
parentce47f7cbbcadbc716325ccdd3be5d71f1e10a966
module: Refine kmemleak scanned areas

commit ac3b43283923 ("module: replace module_layout with module_memory")
introduced a set of memory regions for the module layout sharing the
same attributes. However, it didn't update the kmemleak scanned areas
which intended to limit kmemleak scan to sections containing writable
data. This means sections such as .text and .rodata are scanned by
kmemleak.

Refine the scanned areas for modules by limiting it to MOD_TEXT and
MOD_INIT_TEXT mod_mem regions.

CC: Song Liu <song@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
kernel/module/debug_kmemleak.c