Skip to content

Commit 200d9e7

Browse files
ctmarinasAlex Shi
authored andcommitted
arm64: kasan: Use actual memory node when populating the kernel image shadow
With the 16KB or 64KB page configurations, the generic vmemmap_populate() implementation warns on potential offnode page_structs via vmemmap_verify() because the arm64 kasan_init() passes NUMA_NO_NODE instead of the actual node for the kernel image memory. Fixes: f9040773b7bb ("arm64: move kernel image to base of vmalloc area") Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Reported-by: James Morse <james.morse@arm.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Mark Rutland <mark.rutland@arm.com> (cherry picked from commit 2f76969f2eef051bdd63d38b08d78e790440b0ad) Signed-off-by: Alex Shi <alex.shi@linaro.org>
1 parent b78c702 commit 200d9e7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

arch/arm64/mm/kasan_init.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ void __init kasan_init(void)
152152

153153
clear_pgds(KASAN_SHADOW_START, KASAN_SHADOW_END);
154154

155-
vmemmap_populate(kimg_shadow_start, kimg_shadow_end, NUMA_NO_NODE);
155+
vmemmap_populate(kimg_shadow_start, kimg_shadow_end,
156+
pfn_to_nid(virt_to_pfn(_text)));
156157

157158
/*
158159
* vmemmap_populate() has populated the shadow region that covers the

0 commit comments

Comments
 (0)