mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
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: 235903024 Signed-off-by: Quentin Perret <qperret@google.com> Change-Id: I29d81cb1246c590bd5203d560ea369e5f29d59b0
This commit is contained in:
@@ -2139,11 +2139,11 @@ static int finalize_hyp_mode(void)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Exclude HYP BSS from kmemleak so that it doesn't get peeked
|
* Exclude HYP BSS and DATA from kmemleak so that they don't get peeked
|
||||||
* at, which would end badly once the section is inaccessible.
|
* at, which would end badly once the sections are inaccessible.
|
||||||
* None of other sections should ever be introspected.
|
|
||||||
*/
|
*/
|
||||||
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_data_start, __hyp_data_end - __hyp_data_start);
|
||||||
return pkvm_drop_host_privileges();
|
return pkvm_drop_host_privileges();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user