Commit 06cacc9d authored by Quentin Perret's avatar Quentin Perret Committed by Marc Zyngier

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: default avatarQuentin Perret <qperret@google.com>
Signed-off-by: default avatarFuad Tabba <tabba@google.com>
Acked-by: default avatarOliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20240423150538.2103045-13-tabba@google.comSigned-off-by: default avatarMarc Zyngier <maz@kernel.org>
parent d48965bc
...@@ -258,6 +258,7 @@ static int __init finalize_pkvm(void) ...@@ -258,6 +258,7 @@ static int __init finalize_pkvm(void)
* at, which would end badly once inaccessible. * at, which would end badly once inaccessible.
*/ */
kmemleak_free_part(__hyp_bss_start, __hyp_bss_end - __hyp_bss_start); kmemleak_free_part(__hyp_bss_start, __hyp_bss_end - __hyp_bss_start);
kmemleak_free_part(__hyp_rodata_start, __hyp_rodata_end - __hyp_rodata_start);
kmemleak_free_part_phys(hyp_mem_base, hyp_mem_size); kmemleak_free_part_phys(hyp_mem_base, hyp_mem_size);
ret = pkvm_drop_host_privileges(); ret = pkvm_drop_host_privileges();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment