From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=57763 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7krS-0002oT-5V for qemu-devel@nongnu.org; Thu, 07 Apr 2011 04:46:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7krQ-0003OU-Ko for qemu-devel@nongnu.org; Thu, 07 Apr 2011 04:46:41 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:38235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7krQ-0003O6-FN for qemu-devel@nongnu.org; Thu, 07 Apr 2011 04:46:40 -0400 Received: by wyb42 with SMTP id 42so2234466wyb.4 for ; Thu, 07 Apr 2011 01:46:39 -0700 (PDT) Date: Thu, 7 Apr 2011 09:46:09 +0100 From: Stefan Hajnoczi Subject: Re: [Qemu-devel] [PATCH] virtio-blk: fail unaligned requests Message-ID: <20110407084526.GA21855@stefanha-thinkpad.localdomain> References: <20110406182834.GA471@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110406182834.GA471@lst.de> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: Conor Murphy , qemu-devel@nongnu.org On Wed, Apr 06, 2011 at 08:28:34PM +0200, Christoph Hellwig wrote: > Like all block drivers virtio-blk should not allow small than block size > granularity access. But given that the protocol specifies a > byte unit length field we currently accept such requests, which cause > qemu to abort() in lower layers. Add checks to the main read and > write handlers to catch them early. > > Reported-by: Conor Murphy > Tested-by: Conor Murphy > Signed-off-by: Christoph Hellwig Reviewed-by: Stefan Hajnoczi