summaryrefslogtreecommitdiffstats
path: root/include/crypto/authenc.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-06-01 10:17:45 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-06-01 10:26:14 +0200
commit09d952c971a58c897eb7ea7d41516e7d953bb65d (patch)
treeafd8c62942208c08a2f8c3537991b33bf1508ae1 /include/crypto/authenc.h
parentKVM: selftests: update hyperv_cpuid with SynDBG tests (diff)
downloadlinux-09d952c971a58c897eb7ea7d41516e7d953bb65d.tar.xz
linux-09d952c971a58c897eb7ea7d41516e7d953bb65d.zip
KVM: check userspace_addr for all memslots
The userspace_addr alignment and range checks are not performed for private memory slots that are prepared by KVM itself. This is unnecessary and makes it questionable to use __*_user functions to access memory later on. We also rely on the userspace address being aligned since we have an entire family of functions to map gfn to pfn. Fortunately skipping the check is completely unnecessary. Only x86 uses private memslots and their userspace_addr is obtained from vm_mmap, therefore it must be below PAGE_OFFSET. In fact, any attempt to pass an address above PAGE_OFFSET would have failed because such an address would return true for kvm_is_error_hva. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/crypto/authenc.h')
0 files changed, 0 insertions, 0 deletions