From 8ee914a539bf8f4ba715a39c8319c756cafd17fe Mon Sep 17 00:00:00 2001 From: Quentin Perret Date: Tue, 14 Jun 2022 09:18:32 +0000 Subject: [PATCH] ANDROID: KVM: arm64: Prevent kmemleak from accessing .hyp.data We've recently 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. Bug: 232768943 Bug: 235903024 Signed-off-by: Quentin Perret Change-Id: I29d81cb1246c590bd5203d560ea369e5f29d59b0 --- arch/arm64/kvm/arm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index 59c770f5a00e..4ff9232a8612 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -2177,6 +2177,7 @@ static int finalize_hyp_mode(void) * at, which would end badly once inaccessible. */ kmemleak_free_part(__hyp_bss_start, __hyp_bss_end - __hyp_bss_start); + kmemleak_free_part(__hyp_data_start, __hyp_data_end - __hyp_data_start); kmemleak_free_part(__va(hyp_mem_base), hyp_mem_size); return pkvm_drop_host_privileges(); }