Commit a31b531c authored by Anish Ghulati's avatar Anish Ghulati Committed by Sean Christopherson

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: default avatarMingwei Zhang <mizhang@google.com>
Signed-off-by: default avatarAnish Ghulati <aghulati@google.com>
Link: https://lore.kernel.org/r/20230113220923.2834699-1-aghulati@google.comSigned-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 36b02567
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment