KVM: SVM: Account scratch allocations used to decrypt SEV guest memory
Account the temp/scratch allocation used to decrypt unaligned debug accesses to SEV guest memory, the allocation is very much tied to the target VM. Reported-by: Mingwei Zhang <mizhang@google.com> Signed-off-by: Anish Ghulati <aghulati@google.com> Link: https://lore.kernel.org/r/20230113220923.2834699-1-aghulati@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
This commit is contained in:
parent
36b0256789
commit
a31b531cd2
|
@ -813,7 +813,7 @@ static int __sev_dbg_decrypt_user(struct kvm *kvm, unsigned long paddr,
|
|||
if (!IS_ALIGNED(dst_paddr, 16) ||
|
||||
!IS_ALIGNED(paddr, 16) ||
|
||||
!IS_ALIGNED(size, 16)) {
|
||||
tpage = (void *)alloc_page(GFP_KERNEL | __GFP_ZERO);
|
||||
tpage = (void *)alloc_page(GFP_KERNEL_ACCOUNT | __GFP_ZERO);
|
||||
if (!tpage)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
Loading…
Reference in New Issue