xserver: Branch 'xorg-server-1.4-apple' - 7 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Sat Mar 1 18:08:27 PST 2008


 GL/glx/glxdri.c               |    8 ++++++++
 Xext/security.c               |    2 +-
 Xext/shm.c                    |   12 ++++++------
 composite/compwindow.c        |   25 +++++++++++++++++++++++++
 dix/window.c                  |    3 ++-
 hw/xfree86/modes/xf86Rotate.c |    4 ++--
 6 files changed, 44 insertions(+), 10 deletions(-)

New commits:
commit 509827a598537e9bcd79dae33643d140921d6ffe
Merge: f91c915... a65d4ae...
Author: Jeremy Huddleston <jeremy at tifa.local>
Date:   Sat Mar 1 17:10:42 2008 -0800

    Merge branch 'server-1.4-branch' into xorg-server-1.4-apple

commit a65d4aed06acd839fb21153f74144498abda3e18
Author: Alan Hourihane <alanh at tungstengraphics.com>
Date:   Wed Feb 27 16:49:34 2008 +0000

    Fix context sharing between direct/indirect contexts

diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index 685683d..09abca3 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -598,6 +598,9 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
     else
 	sharePrivate = NULL;
 
+    if (baseShareContext && baseShareContext->isDirect)
+        return NULL;
+
     context = xalloc(sizeof *context);
     if (context == NULL)
 	return NULL;
@@ -617,6 +620,11 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
 					   0, /* render type */
 					   sharePrivate,
 					   &context->driContext);
+    
+    if (!context->driContext.private) {
+    	xfree(context);
+    	return NULL;
+    }
 
     context->driContext.mode = modes;
 
commit 44f46bfb981ca69515dafc520f62f33654711194
Author: Matthias Hopf <mhopf at suse.de>
Date:   Mon Jan 21 16:13:21 2008 +0100

    CVE-2007-6429: Always test for size+offset wrapping.

diff --git a/Xext/shm.c b/Xext/shm.c
index 6f99e90..376f123 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -753,10 +753,10 @@ CreatePmap:
     if (sizeof(size) == 4 && BitsPerPixel(depth) > 8) {
         if (size < width * height)
             return BadAlloc;
-        /* thankfully, offset is unsigned */
-        if (stuff->offset + size < size)
-            return BadAlloc;
     }
+    /* thankfully, offset is unsigned */
+    if (stuff->offset + size < size)
+	return BadAlloc;
 
     VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client);
 
@@ -1098,10 +1098,10 @@ CreatePmap:
     if (sizeof(size) == 4 && BitsPerPixel(depth) > 8) {
 	if (size < width * height)
 	    return BadAlloc;
-	/* thankfully, offset is unsigned */
-	if (stuff->offset + size < size)
-	    return BadAlloc;
     }
+    /* thankfully, offset is unsigned */
+    if (stuff->offset + size < size)
+	return BadAlloc;
 
     VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client);
     pMap = (*shmFuncs[pDraw->pScreen->myNum]->CreatePixmap)(
commit bcbfd619f8da888224afd80ee3a2db7d500523eb
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Wed Jan 16 20:24:11 2008 -0500

    Don't break grab and focus state for a window when redirecting it.
    
    Composite uses an unmap/map cycle to trigger backing pixmap allocation
    and cliprect recomputation when a window is redirected or unredirected.
    To avoid protocol visible side effects, map and unmap events are
    disabled temporarily.  However, when a window is unmapped it is also
    removed from grabs and loses focus, but these state changes are not
    disabled.
    
    This change supresses the unmap side effects during the composite
    unmap/map cycle and fixes this bug:
    
      http://bugzilla.gnome.org/show_bug.cgi?id=488264
    
    where compiz would cause gnome-screensaver to lose its grab when
    compiz unredirects the fullscreen lock window.

diff --git a/dix/window.c b/dix/window.c
index be4ea2c..961c02a 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -3023,7 +3023,8 @@ UnrealizeTree(
 	    } 
 #endif
 	    (* Unrealize)(pChild);
-	    DeleteWindowFromAnyEvents(pChild, FALSE);
+	    if (MapUnmapEventsEnabled(pWin))
+		DeleteWindowFromAnyEvents(pChild, FALSE);
 	    if (pChild->viewable)
 	    {
 #ifdef DO_SAVE_UNDERS
commit dc30ade6496c7cc24e38c419e229159525fe042f
Author: Maarten Maathuis <madman2003 at gmail.com>
Date:   Sun Feb 17 18:47:28 2008 +0100

    Fix rotation for multi-monitor situation.
    
    - The (x,y)-coordinates of the crtc were not being passed as xFixed values, which made it an obscure bug to find.
    - Fix bug #13787.
    (cherry picked from commit a48cc88ea2674c28b69b8d738b168cbafcf4001f)

diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 380478f..dd0e659 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -579,9 +579,9 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
     }
     else
     {
-	PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, crtc->x, crtc->y);
+	PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, F(crtc->x), F(crtc->y));
 	PictureTransformIsInverse ("offset", &crtc_to_fb, &fb_to_crtc);
-	
+
 	/* 
 	 * these are the size of the shadow pixmap, which
 	 * matches the mode, not the pre-rotated copy in the
commit 3db5930c61aeb849de3b21e7ba0d86d3c0cf72bb
Author: Maarten Maathuis <madman2003 at gmail.com>
Date:   Sun Feb 17 11:21:01 2008 +0100

    Resize composite overlay window when the root window changes.
    
    - This allows some compositing managers to work, even after randr12 has changed the root window size.
    - Thanks to ajax for figuring out the best place to put this.
    - Example:
    	- xf86RandR12SetMode() calls EnableDisableFBAccess().
    	- That calls xf86SetRootClip() which in turn calls ResizeChildrenWinSize().
    	- The final step is the call to PositionWindow().
    (cherry picked from commit 70c0592a97c7dc9db0576d32b3bdbe4766520509)

diff --git a/composite/compwindow.c b/composite/compwindow.c
index bfd2946..33192ad 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -165,6 +165,29 @@ compCheckRedirect (WindowPtr pWin)
     return TRUE;
 }
 
+static int
+updateOverlayWindow(ScreenPtr pScreen)
+{
+	CompScreenPtr cs;
+	WindowPtr pWin; /* overlay window */
+	XID vlist[2];
+
+	cs = GetCompScreen(pScreen);
+	if ((pWin = cs->pOverlayWin) != NULL) {
+		if ((pWin->drawable.width == pScreen->width) &&
+			(pWin->drawable.height == pScreen->height))
+			return Success;
+
+		/* Let's resize the overlay window. */
+		vlist[0] = pScreen->width;
+		vlist[1] = pScreen->height;
+		return ConfigureWindow(pWin, CWWidth | CWHeight, vlist, wClient(pWin));
+	}
+
+	/* Let's be on the safe side and not assume an overlay window is always allocated. */
+	return Success;
+}
+
 Bool
 compPositionWindow (WindowPtr pWin, int x, int y)
 {
@@ -203,6 +226,8 @@ compPositionWindow (WindowPtr pWin, int x, int y)
     cs->PositionWindow = pScreen->PositionWindow;
     pScreen->PositionWindow = compPositionWindow;
     compCheckTree (pWin->drawable.pScreen);
+    if (updateOverlayWindow(pScreen) != Success)
+	ret = FALSE;
     return ret;
 }
 
commit 74b40bba327a2e97780e8e3f995f784add2d6231
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Thu Feb 14 19:47:44 2008 -0500

    security: Fix for Bug #14480: untrusted access broken in 7.3.

diff --git a/Xext/security.c b/Xext/security.c
index e9d48c9..14ad354 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -1014,7 +1014,7 @@ CALLBACK(SecurityCheckResourceIDAccess)
     }
     else /* server-owned resource - probably a default colormap or root window */
     {
-	if (RT_WINDOW == rtype || RC_DRAWABLE == rtype)
+	if (RC_DRAWABLE & rtype)
 	{
 	    switch (reqtype)
 	    {   /* the following operations are allowed on root windows */


More information about the xorg-commit mailing list