]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: add missing compat KVM_CLEAR_DIRTY_LOG
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 27 Jul 2021 12:43:10 +0000 (08:43 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Aug 2021 10:27:37 +0000 (12:27 +0200)
commita4ce3f2fad069d6f40867e90092ef5f7d296bac8
tree9dae0c500ff90221626feade9b8eb56aa59a23fa
parentd1f418850ce808af50f7d4081eed368fadf9a7a2
KVM: add missing compat KVM_CLEAR_DIRTY_LOG

commit 8750f9bbda115f3f79bfe43be85551ee5e12b6ff upstream.

The arguments to the KVM_CLEAR_DIRTY_LOG ioctl include a pointer,
therefore it needs a compat ioctl implementation.  Otherwise,
32-bit userspace fails to invoke it on 64-bit kernels; for x86
it might work fine by chance if the padding is zero, but not
on big-endian architectures.

Reported-by: Thomas Sattler
Cc: stable@vger.kernel.org
Fixes: bfe9d5df8ebe ("kvm: introduce manual dirty log reprotect")
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
virt/kvm/kvm_main.c