]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Check userspace_addr when modifying a memory slot
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 10 Dec 2012 17:32:51 +0000 (10:32 -0700)
committerMarcelo Tosatti <mtosatti@redhat.com>
Fri, 14 Dec 2012 01:21:51 +0000 (23:21 -0200)
commit081d42e456cbea99d2e1029bb94716692895aa87
treeee8348edbd718928a384e2eb19103b3d163607ed
parentf12c7fd657cb1a8cefad71649eb71944c231fa21
KVM: Check userspace_addr when modifying a memory slot

The API documents that only flags and guest physical memory space can
be modified on an existing slot, but we don't enforce that the
userspace address cannot be modified.  Instead we just ignore it.
This means that a user may think they've successfully moved both the
guest and user addresses, when in fact only the guest address changed.
Check and error instead.

Reviewed-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
virt/kvm/kvm_main.c