Paolo Bonzini
76d58e0f07
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: 98938aa8ed ("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:22:15 +02:00
..
2019-03-16 13:05:32 -07:00
2019-04-05 16:02:31 -10:00
2019-03-07 11:28:33 +01:00
2019-03-16 12:36:39 -07:00
2019-02-12 15:20:09 +00:00
2019-03-10 10:17:23 -07:00
2019-02-15 08:40:12 -07:00
2019-01-08 17:15:10 -08:00
2019-03-26 13:13:42 -07:00
2018-09-09 15:08:58 -06:00
2019-03-09 09:56:17 -08:00
2019-03-12 10:39:53 -07:00
2018-11-07 13:29:04 +01:00
2018-12-23 11:52:45 +08:00
2019-01-14 17:25:41 -07:00
2019-03-05 14:53:52 -05:00
2019-04-07 13:46:17 -10:00
2019-02-17 15:38:47 -07:00
2019-03-14 09:11:54 -07:00
2019-03-08 10:27:21 -08:00
2018-11-25 12:25:53 -07:00
2018-11-06 07:36:22 -07:00
2019-01-07 15:36:11 -07:00
2019-01-16 17:42:35 +01:00
2019-01-07 22:22:16 +08:00
2019-03-28 08:54:20 -07:00
2018-09-09 15:08:58 -06:00
2018-09-09 15:08:58 -06:00
2019-02-11 10:35:35 +01:00
2018-12-18 14:55:22 +01:00
2019-03-09 09:56:17 -08:00
2019-03-20 17:42:23 +01:00
2018-09-09 15:08:58 -06:00
2019-02-07 12:56:23 -07:00
2019-02-01 16:05:03 -07:00
2019-01-22 13:37:25 +01:00
2018-12-11 16:28:41 -08:00
2018-09-09 15:08:58 -06:00
2019-03-17 12:56:32 +09:00
2019-01-15 11:05:28 +01:00
2019-02-11 08:27:47 -07:00
2018-11-20 09:30:43 -07:00
2019-01-16 22:09:33 +01:00
2019-03-04 12:55:18 -07:00
2018-09-09 15:08:58 -06:00
2019-03-01 09:54:06 -05:00
2018-09-09 15:08:58 -06:00
2019-01-14 08:37:17 -07:00
2018-09-09 15:08:58 -06:00
2018-09-04 23:37:38 +02:00
2018-09-09 15:08:58 -06:00
2019-04-04 15:25:23 +02:00
2018-12-21 12:44:41 -08:00
2018-09-28 15:14:54 +02:00
2018-09-09 15:08:58 -06:00
2018-10-25 06:50:48 -07:00
2018-08-18 12:30:42 -07:00
2018-12-06 12:29:47 +00:00
2019-01-27 12:29:37 +01:00
2018-12-21 11:32:49 +11:00
2019-03-09 09:56:17 -08:00
2019-03-09 09:56:17 -08:00
2018-11-20 09:30:43 -07:00
2019-01-27 12:29:37 +01:00
2019-02-27 09:00:02 -05:00
2019-02-22 08:54:09 -07:00
2018-11-20 09:30:43 -07:00
2018-12-18 16:13:04 +01:00
2019-02-28 13:30:55 +01:00
2018-10-07 09:16:50 -06:00
2019-01-23 10:59:56 +00:00
2019-03-09 09:56:17 -08:00
2019-02-04 21:23:59 -05:00
2018-11-20 09:30:43 -07:00
2019-02-22 08:50:17 -07:00
2019-02-21 10:28:55 -05:00
2019-03-09 09:56:17 -08:00
2019-02-22 09:27:55 +01:00
2019-01-29 22:11:49 +01:00
2019-04-30 21:22:15 +02:00
2019-02-01 16:04:01 -07:00
2018-09-09 15:08:58 -06:00
2019-03-02 15:28:20 +01:00
2019-02-02 10:34:52 +01:00
2018-10-09 13:26:05 +02:00
2019-02-03 18:06:19 -08:00
2018-10-24 18:01:11 +01:00
2019-02-20 07:29:47 -07:00
2019-03-10 12:47:57 -07:00
2019-02-11 08:23:07 -07:00
2019-03-07 18:32:02 -08:00
2018-09-09 14:46:44 -06:00
2019-01-14 08:37:17 -07:00
2018-08-30 10:59:48 -07:00
2018-12-06 13:57:03 +01:00
2019-04-05 16:02:30 -10:00
2018-12-13 09:41:32 -06:00
2018-11-20 09:30:43 -07:00
2018-10-12 11:35:47 -06:00
2019-02-06 16:44:16 -07:00
2018-10-11 11:28:53 -05:00