Re: [PATCH] KVM: Use vmemdup_user()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18/06/21 19:04, Michal Hocko wrote:
On Fri 18-06-21 09:53:53, Jim Mattson wrote:
In any case, these allocations *should* be accounted, shouldn't they?

This is more of a question to maintainers. Are these objects easy to
request by userspace without any bounds?

This particular one need not be accounted because the allocation only lasts for the duration of the ioctl. The allocation below in kvm_vcpu_ioctl_set_cpuid

     e2 = kvmalloc_array(cpuid->nent, sizeof(*e2), GFP_KERNEL_ACCOUNT);

is long term and is already accounted for.

kvm_vcpu_ioctl_set_cpuid2 should also use kvmalloc_array and GFP_KERNEL_ACCOUNT. However, it wasn't doing so before this patch went in, either.

Paolo




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux