From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: fix the handling of dirty bitmaps to avoid overflows Date: Tue, 13 Apr 2010 10:05:38 +0300 Message-ID: <4BC417C2.9030905@redhat.com> References: <20100412193535.6c502695.yoshikawa.takuya@oss.ntt.co.jp> <20100412173951.GA5614@amt.cnet> <4BC3C048.5030704@oss.ntt.co.jp> <4BC4142C.8050400@redhat.com> <4BC41758.4000008@oss.ntt.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , 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]:22329 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752113Ab0DMHFq (ORCPT ); Tue, 13 Apr 2010 03:05:46 -0400 In-Reply-To: <4BC41758.4000008@oss.ntt.co.jp> Sender: kvm-owner@vger.kernel.org List-ID: On 04/13/2010 10:03 AM, Takuya Yoshikawa wrote: >> 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? We need a new patch to block oversize memory slots. The current patch can come on top (but now page numbers fit inside an int, so it is just a cleanup, not a bugfix). -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.