From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHu5U-0001Zf-SJ for qemu-devel@nongnu.org; Tue, 28 Jun 2016 10:34:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHu5P-0008Im-Rj for qemu-devel@nongnu.org; Tue, 28 Jun 2016 10:34:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHu5P-0008IV-Jx for qemu-devel@nongnu.org; Tue, 28 Jun 2016 10:33:59 -0400 References: <1467103170-5784-1-git-send-email-pbonzini@redhat.com> <1467103170-5784-2-git-send-email-pbonzini@redhat.com> From: Eric Blake Message-ID: <57728AD5.5070400@redhat.com> Date: Tue, 28 Jun 2016 08:33:57 -0600 MIME-Version: 1.0 In-Reply-To: <1467103170-5784-2-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fJIx5qx6VT7wB6moBgdMnjeSt1KCQxxhN" Subject: Re: [Qemu-devel] [PATCH 1/3] m25p80: do not put iovec on the stack List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: clg@kaod.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fJIx5qx6VT7wB6moBgdMnjeSt1KCQxxhN From: Eric Blake To: Paolo Bonzini , qemu-devel@nongnu.org Cc: clg@kaod.org Message-ID: <57728AD5.5070400@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/3] m25p80: do not put iovec on the stack References: <1467103170-5784-1-git-send-email-pbonzini@redhat.com> <1467103170-5784-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1467103170-5784-2-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/28/2016 02:39 AM, Paolo Bonzini wrote: > When doing a read-modify-write cycle, QEMU uses the iovec after returni= ng > from blk_aio_pwritev. m25p80 puts the iovec on the stack of blk_aio_pw= ritev's > caller, which causes trouble in this case. This has been a problem > since commit 243e6f6 ("m25p80: Switch to byte-based block access", > 2016-05-12) started doing writes at a smaller granularity than 512 byte= s. > In principle however it could have broken before when using -drive > if=3Dmtd,cache=3Dnone on a disk with 4K native sectors. >=20 > Signed-off-by: Paolo Bonzini > --- > hw/block/m25p80.c | 23 ++++++++++++++--------- > 1 file changed, 14 insertions(+), 9 deletions(-) >=20 Reviewed-by: Eric Blake and thanks for tracking this one down --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --fJIx5qx6VT7wB6moBgdMnjeSt1KCQxxhN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXcorWAAoJEKeha0olJ0NqTCQH/0ZJX/FIWfAtzKEU6mw0E9NI UUyXgOMjxzx63JuvirtFDcY5G4CjmcFwfYkYVGghbga7A2rYTJZ5jLCH/HYokmBG wcpoaz2nnUef1uqtGoX7Li5Ql8lgWGSv7SeN+md5hx3I4/503KK2J0fGb5S+O8MO OQq2pL4ir/xE5bi/pvkZ6ngCsx1iur3i/x9hIHdtF1i06AQq1/CPXTXS2F0pVFmt 7blWE2q7bnQkh1mqz5RNKWaYSvgGytiCAn6sc0cL3IjQgJwS+ixmOSg6VWC8O3tk IFNUOqMioy6GS/XN/FMMICNR4UKA7XeGOAFuFL8eQlD1PbiXocOWqUyKZp01tLI= =ZD/u -----END PGP SIGNATURE----- --fJIx5qx6VT7wB6moBgdMnjeSt1KCQxxhN--