Re: [PATCH] KVM: fix the handling of dirty bitmaps to avoid overflows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





BTW, just from my curiosity, are there any cases in which we use such
huge
number of pages currently?

ALIGN(memslot->npages, BITS_PER_LONG) / 8;

More than G pages need really big memory!
-- We are assuming some special cases like "short" int size?

No, int is 32 bits, but memslot->npages is not our under control.

Note that you don't actually need all those pages to create a large
memory slot.


If so, we may have to care about a lot of things from now on, because
common
functions like __set_bit() don't support such long buffers.

It's better to limit memory slots to something that can be handled by
everything, then. 2^31 pages is plenty. Return -EINVAL if the slot is
too large.

I agree with that, so we make this patch pending to fix like that?
  -- or should make a new patch based on this patch?




--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux