From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JBklj-00028x-H6 for qemu-devel@nongnu.org; Mon, 07 Jan 2008 00:43:27 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JBklh-00028J-P1 for qemu-devel@nongnu.org; Mon, 07 Jan 2008 00:43:26 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBklh-00028A-LE for qemu-devel@nongnu.org; Mon, 07 Jan 2008 00:43:25 -0500 Received: from tapir.sajinet.com.pe ([66.139.79.212]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JBklh-0002fM-DF for qemu-devel@nongnu.org; Mon, 07 Jan 2008 00:43:25 -0500 Date: Sun, 6 Jan 2008 23:52:53 -0600 From: Carlo Marcelo Arenas Belon Subject: Re: [Qemu-devel] QEMU version 0.9.1 Message-ID: <20080107055253.GD24641@tapir> References: <47815041.2080908@bellard.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="J/dobhs11T7y2rNN" Content-Disposition: inline In-Reply-To: <47815041.2080908@bellard.org> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --J/dobhs11T7y2rNN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Jan 06, 2008 at 11:03:45PM +0100, Fabrice Bellard wrote: > > QEMU version 0.9.1 is out ! and if you want to install an OpenSolaris guest on it, apply the attached patch over it. the patch prevents OpenSolaris from overflowing a small buffer when querying the emulated CDROM for its capabilities and getting more data than requested at install time. beware that there are still other problems with the implementation of that command that are being addressed in a bigger patch that is still under revision. Carlo --J/dobhs11T7y2rNN Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="qemu-ide-cdrom-opensolaris.patch" Index: hw/ide.c =================================================================== RCS file: /sources/qemu/qemu/hw/ide.c,v retrieving revision 1.79 diff -u -p -r1.79 ide.c --- hw/ide.c 24 Dec 2007 14:33:24 -0000 1.79 +++ hw/ide.c 7 Jan 2008 05:24:16 -0000 @@ -1648,6 +1648,7 @@ static void ide_atapi_cmd(IDEState *s) ASC_INV_FIELD_IN_CMD_PACKET); break; } + max_len = ube16_to_cpu(packet + 7); memset(buf, 0, 32); bdrv_get_geometry(s->bs, &total_sectors); buf[3] = 16; @@ -1658,7 +1659,7 @@ static void ide_atapi_cmd(IDEState *s) buf[14] = buf[7] == 0x10; /* (in)active */ buf[17] = 0x08; /* CD-ROM profile */ buf[18] = buf[7] == 0x08; /* (in)active */ - ide_atapi_cmd_reply(s, 32, 32); + ide_atapi_cmd_reply(s, 32, max_len); break; } default: --J/dobhs11T7y2rNN--