mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-26 15:31:35 +00:00
Revert "HV: clear memory region used by UOS before it exit"
This reverts commit cf7a94071b
.
This commit is contained in:
parent
9c24c5c85d
commit
cf8fd8cfbc
@ -339,20 +339,6 @@ vm_setup_memory(struct vmctx *ctx, size_t memsize)
|
|||||||
void
|
void
|
||||||
vm_unsetup_memory(struct vmctx *ctx)
|
vm_unsetup_memory(struct vmctx *ctx)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* For security reason, clean the VM's memory region
|
|
||||||
* to avoid secret information leaking in below case:
|
|
||||||
* After a UOS is destroyed, the memory will be reclaimed,
|
|
||||||
* then if the new UOS starts, that memory region may be
|
|
||||||
* allocated the new UOS, the previous UOS sensitive data
|
|
||||||
* may be leaked to the new UOS if the memory is not cleared.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
bzero((void *)ctx->baseaddr, ctx->lowmem);
|
|
||||||
if (ctx->highmem > 0) {
|
|
||||||
bzero((void *)(ctx->baseaddr + 4 * GB), ctx->highmem);
|
|
||||||
}
|
|
||||||
|
|
||||||
hugetlb_unsetup_memory(ctx);
|
hugetlb_unsetup_memory(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user