[lkml]   [2020]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] KVM: X86: deprecate obsolete KVM_GET_CPUID2 ioctl
On Wed, Feb 26, 2020 at 7:20 PM linmiaohe <> wrote:
> From: Miaohe Lin <>
> When kvm_vcpu_ioctl_get_cpuid2() fails, we set cpuid->nent to the value of
> vcpu->arch.cpuid_nent. But this is in vain as cpuid->nent is not copied to
> userspace by copy_to_user() from call site. Also cpuid->nent is not updated
> to indicate how many entries were retrieved on success case. So this ioctl
> is straight up broken. And in fact, it's not used anywhere. So it should be
> deprecated.

I don't know how you can make the assertion that this ioctl is not
used anywhere. For instance, I see a use of it in Google's code base.

 \ /
  Last update: 2020-03-02 18:02    [W:0.075 / U:8.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site