Skip to content

Commit 06cacc9

Browse files
Quentin PerretMarc Zyngier
authored andcommitted
KVM: arm64: Prevent kmemleak from accessing .hyp.data
We've added a .data section for the hypervisor, which kmemleak is eager to parse. This clearly doesn't go well, so add the section to kmemleak's block list. Signed-off-by: Quentin Perret <qperret@google.com> Signed-off-by: Fuad Tabba <tabba@google.com> Acked-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20240423150538.2103045-13-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent d48965b commit 06cacc9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

arch/arm64/kvm/pkvm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ static int __init finalize_pkvm(void)
258258
* at, which would end badly once inaccessible.
259259
*/
260260
kmemleak_free_part(__hyp_bss_start, __hyp_bss_end - __hyp_bss_start);
261+
kmemleak_free_part(__hyp_rodata_start, __hyp_rodata_end - __hyp_rodata_start);
261262
kmemleak_free_part_phys(hyp_mem_base, hyp_mem_size);
262263

263264
ret = pkvm_drop_host_privileges();

0 commit comments

Comments
 (0)