From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXEQj-0002BC-NT for qemu-devel@nongnu.org; Sat, 10 Nov 2012 12:01:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TXEQg-0003zD-K8 for qemu-devel@nongnu.org; Sat, 10 Nov 2012 12:01:13 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:38866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXEQg-0003y4-D2 for qemu-devel@nongnu.org; Sat, 10 Nov 2012 12:01:10 -0500 From: Marek Vasut Date: Sat, 10 Nov 2012 17:54:35 +0100 References: <509E0603.5060709@wiesinger.com> In-Reply-To: <509E0603.5060709@wiesinger.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201211101754.36092.marex@denx.de> Subject: Re: [Qemu-devel] [PATCH] ui/vnc.c: Fix crash with VNC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerhard Wiesinger Cc: Peter Maydell , Anthony Liguori , qemu-devel@nongnu.org, Gerd Hoffmann Dear Gerhard Wiesinger, > On 10.11.2012 00:52, Peter Maydell wrote: > > On 10 November 2012 00:45, Marek Vasut wrote: > >> Gerd Hoffmann wrote: > >>> Question is just whenever we'll go silently fixup stuff in console.c or > >>> use assert()s to enforce callers getting this correct. I'd tend to use > >>> assert() as vmware-vga passing bogous stuff there IMHO indicates there > >>> is a bug in vmware-vga. > >> > >> Or rather some revisions of the guest X driver. > > > > If qemu's vmware-vga is blithely trusting what the guest driver > > hands it then that is itself a bug... > > > > To answer Gerd's question, I think I'd go for clip rather than assert > > (especially at this point in the release cycle), though I don't feel > > very strongly about it. > > I'd go for clipping rather than asserting too (no crash) in all layers > as a defensive approach (console.c/vnc.c). Won't that be an unnecessary slowdown? > Additionally logging that > condition would be helpful that the arising bug (which occurred several > times with a lot of unapplied fixes) can be detected by users easily and > fixed accordingly. Sounds good. > Ciao, > Gerhard Best regards, Marek Vasut