Received: from eggs.gnu.org ([208.118.235.92]:35161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnTvI-0007EO-AU for qemu-devel@nongnu.org; Sat, 07 Jul 2012 08:15:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SnTvG-0007wr-7y for qemu-devel@nongnu.org; Sat, 07 Jul 2012 08:15:39 -0400 Received: from indium.canonical.com ([91.189.90.7]:35895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnTvF-0007vn-Vo for qemu-devel@nongnu.org; Sat, 07 Jul 2012 08:15:38 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1SnTvE-0004lp-Fg for ; Sat, 07 Jul 2012 12:15:36 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 6A73F2E8037 for ; Sat, 7 Jul 2012 12:15:36 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Sat, 07 Jul 2012 12:08:44 -0000 From: Michael Tokarev <918791@bugs.launchpad.net> Sender: bounces@canonical.com References: <20120119164117.24721.19331.malonedeb@wampee.canonical.com> Message-Id: <20120707120844.6486.89693.malone@gac.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 918791] Re: qemu-kvm dies when using vmvga driver and unity in the guest Reply-To: Bug 918791 <918791@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org "if x or y < 0, set them to 0 (and decrement with/height accordingly)" If it is possible in this context to have negative x or y, it is also possible to have them larger than width and heigth by absolute value, so that when decrementing width/height accordingly, width/height becomes negative too. There's more: this function does not check for w/h being positive too, just like it doesn't for x/y. And again, if it is possible to have x<0 or y<0 there, it might be just as well possible to have w<0 or h<0 here. And with w<0 or h<0, we'll most likely crash too. So indeed, some (upstream) verification is needed here -- where these negative values are coming from, whenever it is EVER okay to have them, what to do with these, and where to check (I guess the check should be done somewhere in the upper layer). Thanks, /mjt -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/918791 Title: qemu-kvm dies when using vmvga driver and unity in the guest Status in QEMU: New Status in =E2=80=9Cqemu-kvm=E2=80=9D package in Ubuntu: Fix Released Status in =E2=80=9Cxserver-xorg-video-vmware=E2=80=9D package in Ubuntu: Invalid Status in =E2=80=9Cqemu-kvm=E2=80=9D source package in Oneiric: Fix Committed Status in =E2=80=9Cxserver-xorg-video-vmware=E2=80=9D source package in One= iric: Invalid Status in =E2=80=9Cqemu-kvm=E2=80=9D source package in Precise: Fix Released Status in =E2=80=9Cxserver-xorg-video-vmware=E2=80=9D source package in Pre= cise: Invalid Bug description: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D SRU Justification: 1. impact: kvm crashes 2. Development fix: don't allow attempts to set_bit to negative offsets 3. Stable fix: same as development fix 4. Test case (see below) 5. Regression potential: if the patch is wrong, graphics for vmware vga o= ver vnc could get messed up =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D 12.04's qemu-kvm has been unstable for me and Marc Deslauriers and I figured out it has something to do with the interaction of qemu-kvm, unity and the vmvga driver. This is a regression over qemu-kvm in 11.10. TEST CASE: 1. start a VM that uses unity (eg, 11.04, 11.10 or 12.04). My tests use u= nity-2d on an amd64 host and amd64 guests 2. on 11.04 and 11.10, open empathy via the messaging indicator and click= 'Chat'. On 12.04, open empathy via the messaging indicator and click 'Chat= ', close the empathy wizard, move the empathy window over the unity luanche= r (so it autohides), then do 'ctrl+alt+t' to open a terminal When the launcher tries to auto(un)hide, qemu-kvm dies with this: [10574.958149] do_general_protection: 132 callbacks suppressed [10574.958154] kvm[13192] general protection ip:7fab9680ea0f sp:7ffff4440= 148 error:0 in qemu-system-x86_64[7fab966c4000+2c9000] Relevant libvirt xml: =C2=A0=C2=A0=C2=A0=C2=A0