From: Ian Jackson Subject: Re: [PATCH] ioemu block device extent checks Date: Wed, 27 Feb 2008 13:14:16 +0000 Message-ID: <18373.25128.186216.207710@mariner.uk.xensource.com> References: <18363.1536.661607.292188@mariner.uk.xensource.com> <20080226204130.GC24548@redhat.com> <18373.18757.256451.327128@mariner.uk.xensource.com> <20080227125704.GA13508@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080227125704.GA13508@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Daniel P. Berrange" Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Daniel P. Berrange writes ("Re: [Xen-devel] [PATCH] ioemu block device extent checks"): > I don't think this is correct - it allows a -ve size / nb_sectors > value when autoextenable is set, and allows out of bounds reads. That's fine because it's only called like that as a the parent block driver. Perhaps a different name would have been better. Out of bounds reads have to be permitted because the block size in the header may remain un-updated, so reads of newly-cloned blocks may fail. > I sent a patch to qemu-devel yuesterday which also uses the auto-extend > flag, but has separate checks for read vs writes. When doing a write that > would extend the device it increases the total_sectors count so that the > subsequent reads can be validated to be within the written bounds. Well, that seems like makework to me but fine if upstream accept it. Ian.