From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH] KVM: fix the handling of dirty bitmaps to avoid overflows Date: Mon, 12 Apr 2010 14:39:51 -0300 Message-ID: <20100412173951.GA5614@amt.cnet> References: <20100412193535.6c502695.yoshikawa.takuya@oss.ntt.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: avi@redhat.com, kvm@vger.kernel.org, kvm-ia64@vger.kernel.org, kvm-ppc@vger.kernel.org To: Takuya Yoshikawa Return-path: Received: from mx1.redhat.com ([209.132.183.28]:55139 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751432Ab0DLRkQ (ORCPT ); Mon, 12 Apr 2010 13:40:16 -0400 Content-Disposition: inline In-Reply-To: <20100412193535.6c502695.yoshikawa.takuya@oss.ntt.co.jp> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Apr 12, 2010 at 07:35:35PM +0900, Takuya Yoshikawa wrote: > This patch fixes a bug found by Avi during the review process > of my dirty bitmap related work. > > To ppc and ia64 people: > The fix is really simple but touches all architectures using > dirty bitmaps. So please check this will not suffer your part. > > === > > Int is not long enough to store the size of a dirty bitmap. > > This patch fixes this problem with the introduction of a wrapper > function to calculate the sizes of dirty bitmaps. > > Note: in mark_page_dirty(), we have to consider the fact that > __set_bit() takes the offset as int, not long. > > Signed-off-by: Takuya Yoshikawa Applied, thanks.