From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEYYf-0003KD-RZ for qemu-devel@nongnu.org; Mon, 13 Jul 2015 03:53:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEYYc-0000Hz-JS for qemu-devel@nongnu.org; Mon, 13 Jul 2015 03:53:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEYYc-0000Hv-D5 for qemu-devel@nongnu.org; Mon, 13 Jul 2015 03:53:46 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id D53E219F982 for ; Mon, 13 Jul 2015 07:53:45 +0000 (UTC) Message-ID: <1436774023.26533.5.camel@redhat.com> From: Gerd Hoffmann Date: Mon, 13 Jul 2015 09:53:43 +0200 In-Reply-To: <20150713102533-mutt-send-email-mst@redhat.com> References: <1436766411-29144-1-git-send-email-jasowang@redhat.com> <20150713102533-mutt-send-email-mst@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/5] virtio-pci: ignore unaligned read/write in virtio_address_space_read()/write() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Jason Wang , qemu-devel@nongnu.org On Mo, 2015-07-13 at 10:36 +0300, Michael S. Tsirkin wrote: > On Mon, Jul 13, 2015 at 01:46:47PM +0800, Jason Wang wrote: > > We abort on unaligned read/write in > > virtio_address_space_read()/write() but since len in under control of > > guest so qemu will simply crash when booting a modern guest (guest is > > try to read when len is zero). > > read. > > How can len be 0? Isn't this a guest bug? Or is this > a theoretical issue? Something dumping pci config space? With pci access capability not being used before and therefore zeroed? Then hitting the "data" field will trigger a zero-length read. That assert actually triggers when booting a recent linux kernel with disable-modern=off cheers, Gerd