]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
module: don't annotate ROX memory as kmemleak_not_leak()
authorMike Rapoport (Microsoft) <rppt@kernel.org>
Fri, 14 Feb 2025 08:45:31 +0000 (10:45 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 14 Feb 2025 09:32:02 +0000 (10:32 +0100)
commit675204778c69c2b3e0f6a4e2dbfeb4f3e89194ba
treeef5039d848ba6ed8f48b583b33abe8c55643c928
parent63887c9f02030afd042c125052ad60680f7c21b2
module: don't annotate ROX memory as kmemleak_not_leak()

The ROX memory allocations are part of a larger vmalloc allocation and
annotating them with kmemleak_not_leak() confuses kmemleak.

Skip kmemleak_not_leak() annotations for the ROX areas.

Fixes: c287c0723329 ("module: switch to execmem API for remapping as RW and restoring ROX")
Fixes: 64f6a4e10c05 ("x86: re-enable EXECMEM_ROX support")
Reported-by: "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com>
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250214084531.3299390-1-rppt@kernel.org
kernel/module/main.c