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 <qperret@google.com>
Change-Id: I29d81cb1246c590bd5203d560ea369e5f29d59b0
This commit is contained in:
Quentin Perret 2022-06-14 09:18:32 +00:00
parent 4a006e6d47
commit 546461d83f
1 changed files with 1 additions and 0 deletions

View File

@ -2176,6 +2176,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();
}