linux/Documentation
Paolo Bonzini 65c4189de8 KVM: fix KVM_CLEAR_DIRTY_LOG for memory slots of unaligned size
If a memory slot's size is not a multiple of 64 pages (256K), then
the KVM_CLEAR_DIRTY_LOG API is unusable: clearing the final 64 pages
either requires the requested page range to go beyond memslot->npages,
or requires log->num_pages to be unaligned, and kvm_clear_dirty_log_protect
requires log->num_pages to be both in range and aligned.

To allow this case, allow log->num_pages not to be a multiple of 64 if
it ends exactly on the last page of the slot.

Reported-by: Peter Xu <peterx@redhat.com>
Fixes: 98938aa8edd6 ("KVM: validate userspace input in kvm_clear_dirty_log_protect()", 2019-01-02)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-04-30 21:32:19 +02:00
..
2019-03-16 13:05:32 -07:00
2019-03-16 12:36:39 -07:00
2019-03-10 10:17:23 -07:00
2019-04-07 13:46:17 -10:00
2019-03-14 09:11:54 -07:00
2019-03-28 08:54:20 -07:00
2019-02-11 10:35:35 +01:00
2018-10-25 06:50:48 -07:00
2018-12-18 16:13:04 +01:00
2019-02-28 13:30:55 +01:00
2019-02-22 08:50:17 -07:00
2019-03-10 12:47:57 -07:00
2018-05-08 09:16:41 -06:00