KVM: x86: Add a helper to retrieve userspace address from kvm_device_attr
mainline inclusion from mainline-v5.17-rc2 commit 56f289a8 category: feature bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I5RQLJ CVE: NA Intel-SIG: commit 56f289a8 KVM: x86: Add a helper to retrieve userspace address from kvm_device_attr. -------------------------------- Add a helper to handle converting the u64 userspace address embedded in struct kvm_device_attr into a userspace pointer, it's all too easy to forget the intermediate "unsigned long" cast as well as the truncation check. No functional change intended. Signed-off-by: NSean Christopherson <seanjc@google.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NLin Wang <lin.x.wang@intel.com>
Showing
想要评论请 注册 或 登录