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