From owner-freebsd-ports@FreeBSD.ORG Fri Sep 21 22:15:10 2007 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 851FC16A46D; Fri, 21 Sep 2007 22:15:10 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from gnome.kiev.sovam.com (gnome.kiev.sovam.com [212.109.32.24]) by mx1.freebsd.org (Postfix) with ESMTP id 1B5F913C48A; Fri, 21 Sep 2007 22:15:10 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay02.kiev.sovam.com ([62.64.120.197]) by gnome.kiev.sovam.com with esmtp (Exim 4.67 (FreeBSD)) (envelope-from ) id 1IYpqO-000Pqr-AA; Sat, 22 Sep 2007 00:15:24 +0300 Received: from [212.82.216.226] (helo=deviant.kiev.zoral.com.ua) by relay02.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1IYnpP-000EmZ-An; Fri, 21 Sep 2007 22:06:23 +0300 Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.1/8.14.1) with ESMTP id l8LJ6BKu087560; Fri, 21 Sep 2007 22:06:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.1/8.14.1/Submit) id l8LJ6BcM087559; Fri, 21 Sep 2007 22:06:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 21 Sep 2007 22:06:11 +0300 From: Kostik Belousov To: Helko Glathe Message-ID: <20070921190611.GA87366@deviant.kiev.zoral.com.ua> References: <200709211954.04286.Helko.Glathe@freenet.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline In-Reply-To: <200709211954.04286.Helko.Glathe@freenet.de> User-Agent: Mutt/1.4.2.3i X-Scanner-Signature: 4a8c88282c0f25e9583c2ce2041a0635 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 1513 [September 21 2007] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {received from trusted relay: not dialup} X-SpamTest-Method: none X-SpamTest-Method: Local Lists X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release X-Delayed: more then 1h on relay02.kiev.sovam.com Cc: ports@freebsd.org, flz@freebsd.org Subject: Re: FreeBSD Port: google-earth-4.1.7076.4458 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2007 22:15:10 -0000 --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 21, 2007 at 07:54:03PM +0200, Helko Glathe wrote: > Hi. >=20 > I've installed google-earth. Everytime starting googleearth the complete= =20 > system freezes after few minutes while googleearth is running. > My computer has an Intel 82945GM (945GM GMCH) graphic device. > I've also tried to use the intel driver and i810 driver in my xorg.conf. = But=20 > behaviour of googleearth is the same. >=20 > System version: > FreeBSD FreeBSD_TWS29. 6.2-STABLE FreeBSD 6.2-STABLE #1: Sat Apr 28 15:25= :05=20 > CEST 2007 kater@FreeBSD_TWS29:/usr/obj/usr/src/sys/MYKERNEL62 i386 >=20 > Port version: > google-earth-4.2.198.2451 >=20 > Graphics device:=20 > agp0: port 0x1800-0x1807 mem= =20 > 0xd8100000-0xd817ffff,0xc0000000-0xcfffffff, > 0xd8200000-0xd823ffff irq 16 at device 2.0 on pci0 >=20 > XORG configuration: > Section "ServerLayout" > Identifier "X.org Configured" > Screen "Screen0" > InputDevice "Mouse0" "CorePointer" > InputDevice "Keyboard0" "CoreKeyboard" > #Option "AIGLX" "True" > EndSection >=20 > Section "Files" > RgbPath "/usr/local/lib/X11/rgb" > ModulePath "/usr/local/lib/xorg/modules" > FontPath "/usr/local/lib/X11/fonts/misc/" > FontPath "/usr/local/lib/X11/fonts/TTF/" > FontPath "/usr/local/lib/X11/fonts/Type1/" > FontPath "/usr/local/lib/X11/fonts/CID/" > FontPath "/usr/local/lib/X11/fonts/75dpi/" > FontPath "/usr/local/lib/X11/fonts/100dpi/" > EndSection >=20 > Section "Module" > Load "dri" > Load "glx" > Load "dbe" > Load "vbe" > Load "extmod" > Load "type1" > Load "freetype" > Load "i2c" > Load "bitmap" > Load "ddc" > Load "int10" > # Originals commented out > #Load "speedo" > # SubSection "extmod" > # Option "omit xfree86-dga" > # EndSubSection > EndSection >=20 > Section "InputDevice" > Identifier "Keyboard0" > Driver "kbd" > Option "XkbModel" "pc105" > Option "XkbLayout" "de_DE" > Option "XkbRules" "xorg" > EndSection >=20 > Section "InputDevice" > Identifier "Mouse0" > Driver "mouse" > Option "Protocol" "auto" > Option "Device" "/dev/sysmouse" > Option "Buttons" "5" > Option "ZAxisMapping" "4 5" > EndSection =20 >=20 > Section "Monitor" > Identifier "Generic Monitor" > HorizSync 28-64 > VertRefresh 43-60 > DisplaySize 264 165 > Option "DPMS" > EndSection >=20 > Section "Device" > ### Available Driver options are:- > ### Values: : integer, : float, : "True"/"False", > ### : "String", : " Hz/kHz/MHz" > Identifier "Intel Corporation Mobile Integrated Graphics Controll= er" > Driver "i810" > BusID "PCI:0:2:0" > Option "DRI" "on" > Option "XAANoOffscreenPixmaps" "true" > EndSection >=20 > Section "Screen" > Identifier "Screen0" > Device "Intel Corporation Mobile Integrated Graphics Controller" > Monitor "Generic Monitor" > DefaultDepth 24 > SubSection "Display" > Depth 1 > Modes "1280x800" > EndSubSection > SubSection "Display" > Depth 4 > Modes "1280x800" > EndSubSection > SubSection "Display" > Depth 8 > Modes "1280x800" > EndSubSection > SubSection "Display" > Depth 15 > Modes "1280x800" > EndSubSection > SubSection "Display" > Depth 16 > Modes "1280x800" > EndSubSection > SubSection "Display" > Depth 24 > Modes "1280x800" > # Virtual 1440 900 > EndSubSection > EndSection >=20 > Section "DRI" > Mode 0666 > EndSection >=20 > Section "Extensions" > Option "Composite" "true" > EndSection Does dmesg show anything suspicious while running application ? Also, just in case, try the patch below and report whether it helps. diff --git a/sys/dev/drm/i915_dma.c b/sys/dev/drm/i915_dma.c index 16955bd..69854b4 100644 --- a/sys/dev/drm/i915_dma.c +++ b/sys/dev/drm/i915_dma.c @@ -366,20 +366,14 @@ static int i915_emit_cmds(drm_device_t * dev, int __u= ser * buffer, int dwords) for (i =3D 0; i < dwords;) { int cmd, sz; =20 - if (DRM_COPY_FROM_USER_UNCHECKED(&cmd, &buffer[i], sizeof(cmd))) { - - return DRM_ERR(EINVAL); - } + cmd =3D buffer[i]; if ((sz =3D validate_cmd(cmd)) =3D=3D 0 || i + sz > dwords) return DRM_ERR(EINVAL); =20 OUT_RING(cmd); =20 while (++i, --sz) { - if (DRM_COPY_FROM_USER_UNCHECKED(&cmd, &buffer[i], - sizeof(cmd))) { - return DRM_ERR(EINVAL); - } + cmd =3D buffer[i]; OUT_RING(cmd); } } @@ -400,10 +394,7 @@ static int i915_emit_box(drm_device_t * dev, drm_clip_rect_t box; RING_LOCALS; =20 - if (DRM_COPY_FROM_USER_UNCHECKED(&box, &boxes[i], sizeof(box))) { - return EFAULT; - } - + box =3D boxes[i]; if (box.y2 <=3D box.y1 || box.x2 <=3D box.x1 || box.y2 <=3D 0 || box.x2 <= =3D 0) { DRM_ERROR("Bad box %d,%d..%d,%d\n", box.x1, box.y1, box.x2, box.y2); @@ -603,6 +594,7 @@ static int i915_batchbuffer(DRM_IOCTL_ARGS) drm_i915_sarea_t *sarea_priv =3D (drm_i915_sarea_t *) dev_priv->sarea_priv; drm_i915_batchbuffer_t batch; + size_t cliplen; int ret; =20 if (!dev_priv->allow_batchbuffer) { @@ -618,14 +610,25 @@ static int i915_batchbuffer(DRM_IOCTL_ARGS) =20 LOCK_TEST_WITH_RETURN(dev, filp); =20 + DRM_UNLOCK(); + cliplen =3D batch.num_cliprects * sizeof(drm_clip_rect_t);=09 if (batch.num_cliprects && DRM_VERIFYAREA_READ(batch.cliprects, - batch.num_cliprects * - sizeof(drm_clip_rect_t))) + cliplen)) { + DRM_LOCK(); return DRM_ERR(EFAULT); - + } + ret =3D vslock(batch.cliprects, cliplen); + if (ret) { + DRM_ERROR("Fault wiring cliprects\n"); + DRM_LOCK(); + return DRM_ERR(EFAULT); + } + DRM_LOCK(); ret =3D i915_dispatch_batchbuffer(dev, &batch); - sarea_priv->last_dispatch =3D (int)hw_status[5]; + DRM_UNLOCK(); + vsunlock(batch.cliprects, cliplen); + DRM_LOCK(); return ret; } =20 @@ -637,6 +640,7 @@ static int i915_cmdbuffer(DRM_IOCTL_ARGS) drm_i915_sarea_t *sarea_priv =3D (drm_i915_sarea_t *) dev_priv->sarea_priv; drm_i915_cmdbuffer_t cmdbuf; + size_t cliplen; int ret; =20 DRM_COPY_FROM_USER_IOCTL(cmdbuf, (drm_i915_cmdbuffer_t __user *) data, @@ -647,22 +651,38 @@ static int i915_cmdbuffer(DRM_IOCTL_ARGS) =20 LOCK_TEST_WITH_RETURN(dev, filp); =20 + DRM_UNLOCK(); + cliplen =3D cmdbuf.num_cliprects * sizeof(drm_clip_rect_t); if (cmdbuf.num_cliprects && - DRM_VERIFYAREA_READ(cmdbuf.cliprects, - cmdbuf.num_cliprects * - sizeof(drm_clip_rect_t))) { + DRM_VERIFYAREA_READ(cmdbuf.cliprects, cliplen)) { DRM_ERROR("Fault accessing cliprects\n"); + DRM_LOCK(); return DRM_ERR(EFAULT); } - - ret =3D i915_dispatch_cmdbuffer(dev, &cmdbuf); + ret =3D vslock(cmdbuf.cliprects, cliplen); if (ret) { - DRM_ERROR("i915_dispatch_cmdbuffer failed\n"); - return ret; + DRM_ERROR("Fault wiring cliprects\n"); + DRM_LOCK(); + return DRM_ERR(EFAULT); } - - sarea_priv->last_dispatch =3D (int)hw_status[5]; - return 0; + ret =3D vslock(cmdbuf.buf, cmdbuf.sz); + if (ret) { + vsunlock(cmdbuf.cliprects, cliplen); + DRM_ERROR("Fault wiring cmds\n"); + DRM_LOCK(); + return DRM_ERR(EFAULT); + } + DRM_LOCK(); + ret =3D i915_dispatch_cmdbuffer(dev, &cmdbuf); + if (ret =3D=3D 0) + sarea_priv->last_dispatch =3D (int)hw_status[5]; + else + DRM_ERROR("i915_dispatch_cmdbuffer failed\n"); + DRM_UNLOCK(); + vsunlock(cmdbuf.buf, cmdbuf.sz); + vsunlock(cmdbuf.cliprects, cliplen); + DRM_LOCK(); + return (ret); } =20 static int i915_do_cleanup_pageflip(drm_device_t * dev) --tKW2IUtsqtDRztdT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFG9BYiC3+MBN1Mb4gRAsmJAJ979g0BygOFrJg9WVo/6A/Eth39XgCg6BW4 N6Q2qV93CHlnWAPEdeIhZGg= =+4Qn -----END PGP SIGNATURE----- --tKW2IUtsqtDRztdT--