KVM: Fix the bitmap range to copy during clear dirty
mainline inclusion from mainline-v5.10 commit: 4ddc9204 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I66COX CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=4ddc9204572c33f2eb91fbdb1d99d8078388b67d -------------------------------- kvm_dirty_bitmap_bytes() will return the size of the dirty bitmap of the memslot rather than the size of bitmap passed over from the ioctl. Here for KVM_CLEAR_DIRTY_LOG we should only copy exactly the size of bitmap that covers kvm_clear_dirty_log.num_pages. Signed-off-by:Peter Xu <peterx@redhat.com> Cc: stable@vger.kernel.org Fixes: 2a31b9db Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
Loading
Please sign in to comment