Re: [PATCH 3/3] KVM: selftests: Fix dirty bitmap offset calculation

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

 



On Wed, Sep 15, 2021 at 02:55:03PM -0700, Ben Gardon wrote:
> On Wed, Sep 15, 2021 at 2:30 PM David Matlack <dmatlack@xxxxxxxxxx> wrote:
> >
> > The calculation to get the per-slot dirty bitmap was incorrect leading
> > to a buffer overrun. Fix it by dividing the number of pages by
> > BITS_PER_LONG, since each element of the bitmap is a long and there is
> > one bit per page.
> >
> > Fixes: 609e6202ea5f ("KVM: selftests: Support multiple slots in dirty_log_perf_test")
> > Signed-off-by: David Matlack <dmatlack@xxxxxxxxxx>
> 
> I was a little confused initially because we're allocating only one
> dirty bitmap in userspace even when we have multiple slots, but that's
> not a problem.

It's also confusing to me. Wouldn't it be better to create a bitmap per
slot? I think the new constraint that host mem must be a multiple of 64
is unfortunate.

Thanks,
drew




[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