]> www.infradead.org Git - users/hch/block.git/commit
KVM: x86: use u64_to_user_ptr()
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 4 Apr 2024 12:13:13 +0000 (08:13 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Apr 2024 17:08:22 +0000 (13:08 -0400)
commit8d2aec3b2d7937ed77d2daa8f29c6dfc01100953
tree4b0e6b44a918b7e23675e960636799753ae3097a
parent0d7bf5e5b00a131cc02ecadbbf42563c0721aaeb
KVM: x86: use u64_to_user_ptr()

There is no danger to the kernel if 32-bit userspace provides a 64-bit
value that has the high bits set, but for whatever reason happens to
resolve to an address that has something mapped there.  KVM uses the
checked version of get_user() and put_user(), so any faults are caught
properly.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <20240404121327.3107131-4-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c