From 9454cddc99439086de009b57d3284b1b5c2225307783617f770ed0e22e45ab6b Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Fri, 22 Oct 2010 14:16:19 +0000 Subject: [PATCH 1/3] - xfree86: Kill pixmapPrivate with a vengeance (v2) ScrnInfo->pixmapPrivate only existed in order to catch invalid access to the framebuffer by making the backing data NULL across the VT switch. This was causing more confusion in the higher layers during mode setting without any real benefit, so remove it. v2: Kill ShadowModifyPixmapHeader() as well. (ABI change!) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=292 --- commit-5c6a2f9.diff | 165 ++++++++++++++++++++++++++++++++++++++++ xorg-x11-server.changes | 10 +++ xorg-x11-server.spec | 2 + 3 files changed, 177 insertions(+) create mode 100644 commit-5c6a2f9.diff diff --git a/commit-5c6a2f9.diff b/commit-5c6a2f9.diff new file mode 100644 index 0000000..c9abbbd --- /dev/null +++ b/commit-5c6a2f9.diff @@ -0,0 +1,165 @@ +commit 5c6a2f93ebc16a78093782b442306de23ae94e78 +Author: Chris Wilson +Date: Mon Sep 27 19:39:23 2010 +0100 + + xfree86: Kill pixmapPrivate with a vengeance (v2) + + ScrnInfo->pixmapPrivate only existed in order to catch invalid access to + the framebuffer by making the backing data NULL across the VT switch. + This was causing more confusion in the higher layers during mode setting + without any real benefit, so remove it. + + v2: Kill ShadowModifyPixmapHeader() as well. + + Signed-off-by: Chris Wilson + Cc: Julien Cristau + Cc: Andrew Guertin + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c +index 90e0c67..97e5aec 100644 +--- a/hw/xfree86/common/xf86Helper.c ++++ b/hw/xfree86/common/xf86Helper.c +@@ -1180,10 +1180,6 @@ xf86EnableDisableFBAccess(int scrnIndex, Bool enable) + if (enable) + { + /* +- * Restore the screen pixmap devPrivate field +- */ +- pspix->devPrivate = pScrnInfo->pixmapPrivate; +- /* + * Restore all of the clip lists on the screen + */ + if (!xf86Resetting) +@@ -1196,13 +1192,6 @@ xf86EnableDisableFBAccess(int scrnIndex, Bool enable) + * Empty all of the clip lists on the screen + */ + xf86SetRootClip (pScreen, FALSE); +- /* +- * save the screen pixmap devPrivate field and +- * replace it with NULL so accidental references +- * to the frame buffer are caught +- */ +- pScrnInfo->pixmapPrivate = pspix->devPrivate; +- pspix->devPrivate.ptr = NULL; + } + } + +diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h +index c9b261d..b979884 100644 +--- a/hw/xfree86/common/xf86str.h ++++ b/hw/xfree86/common/xf86str.h +@@ -765,7 +765,6 @@ typedef struct _ScrnInfoRec { + + /* Allow screens to be enabled/disabled individually */ + Bool vtSema; +- DevUnion pixmapPrivate; /* saved devPrivate from pixmap */ + + /* hw cursor moves at SIGIO time */ + Bool silkenMouse; +diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c +index 8a593a7..ba0862a 100644 +--- a/hw/xfree86/modes/xf86RandR12.c ++++ b/hw/xfree86/modes/xf86RandR12.c +@@ -511,7 +511,6 @@ xf86RandR12SetMode (ScreenPtr pScreen, + WindowPtr pRoot = pScreen->root; + DisplayModePtr currentMode = NULL; + Bool ret = TRUE; +- PixmapPtr pspix = NULL; + + if (pRoot) + (*scrp->EnableDisableFBAccess) (pScreen->myNum, FALSE); +@@ -560,14 +559,6 @@ xf86RandR12SetMode (ScreenPtr pScreen, + pScreen->mmHeight = oldmmHeight; + scrp->currentMode = currentMode; + } +- /* +- * Get the new Screen pixmap ptr as SwitchMode might have called +- * ModifyPixmapHeader and xf86EnableDisableFBAccess will put it back... +- * Unfortunately. +- */ +- pspix = (*pScreen->GetScreenPixmap) (pScreen); +- if (pspix->devPrivate.ptr) +- scrp->pixmapPrivate = pspix->devPrivate; + + /* + * Make sure the layout is correct +diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c +index 0af53d1..5cc476a 100644 +--- a/hw/xfree86/shadowfb/shadow.c ++++ b/hw/xfree86/shadowfb/shadow.c +@@ -36,15 +36,6 @@ static void ShadowCopyWindow( + RegionPtr prgn + ); + static Bool ShadowCreateGC(GCPtr pGC); +-static Bool ShadowModifyPixmapHeader( +- PixmapPtr pPixmap, +- int width, +- int height, +- int depth, +- int bitsPerPixel, +- int devKind, +- pointer pPixData +-); + + static Bool ShadowEnterVT(int index, int flags); + static void ShadowLeaveVT(int index, int flags); +@@ -189,7 +180,6 @@ ShadowFBInit2 ( + pScreen->CloseScreen = ShadowCloseScreen; + pScreen->CopyWindow = ShadowCopyWindow; + pScreen->CreateGC = ShadowCreateGC; +- pScreen->ModifyPixmapHeader = ShadowModifyPixmapHeader; + + pScrn->EnterVT = ShadowEnterVT; + pScrn->LeaveVT = ShadowLeaveVT; +@@ -310,49 +300,6 @@ ShadowCopyWindow( + } + } + +-static Bool +-ShadowModifyPixmapHeader( +- PixmapPtr pPixmap, +- int width, +- int height, +- int depth, +- int bitsPerPixel, +- int devKind, +- pointer pPixData +-) +-{ +- ScreenPtr pScreen; +- ScrnInfoPtr pScrn; +- ShadowScreenPtr pPriv; +- Bool retval; +- PixmapPtr pScreenPix; +- +- if (!pPixmap) +- return FALSE; +- +- pScreen = pPixmap->drawable.pScreen; +- pScrn = xf86Screens[pScreen->myNum]; +- +- pScreenPix = (*pScreen->GetScreenPixmap)(pScreen); +- +- if (pPixmap == pScreenPix && !pScrn->vtSema) +- pScreenPix->devPrivate = pScrn->pixmapPrivate; +- +- pPriv = GET_SCREEN_PRIVATE(pScreen); +- +- pScreen->ModifyPixmapHeader = pPriv->ModifyPixmapHeader; +- retval = (*pScreen->ModifyPixmapHeader)(pPixmap, +- width, height, depth, bitsPerPixel, devKind, pPixData); +- pScreen->ModifyPixmapHeader = ShadowModifyPixmapHeader; +- +- if (pPixmap == pScreenPix && !pScrn->vtSema) +- { +- pScrn->pixmapPrivate = pScreenPix->devPrivate; +- pScreenPix->devPrivate.ptr = 0; +- } +- return retval; +-} +- + static void + ShadowComposite( + CARD8 op, diff --git a/xorg-x11-server.changes b/xorg-x11-server.changes index be9829c..d3b69de 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Oct 22 14:10:13 UTC 2010 - sndirsch@novell.com + +- xfree86: Kill pixmapPrivate with a vengeance (v2) + ScrnInfo->pixmapPrivate only existed in order to catch invalid + access to the framebuffer by making the backing data NULL across + the VT switch. This was causing more confusion in the higher + layers during mode setting without any real benefit, so remove + it. v2: Kill ShadowModifyPixmapHeader() as well. (ABI change!) + ------------------------------------------------------------------- Fri Oct 15 18:59:14 UTC 2010 - sndirsch@novell.com diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index eaf9ddc..7dea12e 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -115,6 +115,7 @@ Patch213: xorg-server-xdmcp.patch Patch217: CVE-2010-2240-address_space_limit.patch Patch218: CVE-2010-2240-tree_depth_limit.patch Patch220: Use-external-tool-for-creating-backtraces-on-crashes.patch +Patch221: commit-5c6a2f9.diff %if %moblin Patch300: moblin-use_preferred_mode_for_all_outputs.diff %endif @@ -240,6 +241,7 @@ popd %patch217 -p1 %patch218 -p1 %patch220 -p1 +%patch221 -p1 %if %moblin %patch300 -p1 %endif From 4cb7f3a6c098d7bbbae35d1fb7cba2ab8ac66f950ec5899fc1341b58878dcfa4 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Sat, 23 Oct 2010 01:27:07 +0000 Subject: [PATCH 2/3] - disable commit-5c6a2f9.diff for now OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=293 --- xorg-x11-server.changes | 8 +++++++- xorg-x11-server.spec | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/xorg-x11-server.changes b/xorg-x11-server.changes index d3b69de..bdc2d6c 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Sat Oct 23 01:19:50 UTC 2010 - sndirsch@novell.com + +- disable commit-5c6a2f9.diff for now + ------------------------------------------------------------------- Fri Oct 22 14:10:13 UTC 2010 - sndirsch@novell.com -- xfree86: Kill pixmapPrivate with a vengeance (v2) +- commit-5c6a2f9.diff + xfree86: Kill pixmapPrivate with a vengeance (v2) ScrnInfo->pixmapPrivate only existed in order to catch invalid access to the framebuffer by making the backing data NULL across the VT switch. This was causing more confusion in the higher diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 7dea12e..f72c49a 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -241,7 +241,7 @@ popd %patch217 -p1 %patch218 -p1 %patch220 -p1 -%patch221 -p1 +#%patch221 -p1 %if %moblin %patch300 -p1 %endif From 106fc56b846db016082080b11d72d56530320f39407b4aaa933490794ac8452d Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Sun, 24 Oct 2010 10:10:21 +0000 Subject: [PATCH 3/3] - xorg-server 1.9.1 (final release) * functionally equivalent to xorg-server 1.9.0.902 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=294 --- xorg-server-1.9.0.902.tar.bz2 | 3 --- xorg-server-1.9.1.tar.bz2 | 3 +++ xorg-x11-server.changes | 6 ++++++ xorg-x11-server.spec | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) delete mode 100644 xorg-server-1.9.0.902.tar.bz2 create mode 100644 xorg-server-1.9.1.tar.bz2 diff --git a/xorg-server-1.9.0.902.tar.bz2 b/xorg-server-1.9.0.902.tar.bz2 deleted file mode 100644 index a2b58f8..0000000 --- a/xorg-server-1.9.0.902.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bbb48daf562f6b046b649a592490de86ea2d5c7608c792a8d6103ddf950d753a -size 5220109 diff --git a/xorg-server-1.9.1.tar.bz2 b/xorg-server-1.9.1.tar.bz2 new file mode 100644 index 0000000..7003592 --- /dev/null +++ b/xorg-server-1.9.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33e7624a52a21762c9dfdabde7b7bd1221c5298fd1b429f7c6b683145710114e +size 5219517 diff --git a/xorg-x11-server.changes b/xorg-x11-server.changes index bdc2d6c..3d16bae 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Oct 24 09:53:06 UTC 2010 - sndirsch@novell.com + +- xorg-server 1.9.1 (final release) + * functionally equivalent to xorg-server 1.9.0.902 + ------------------------------------------------------------------- Sat Oct 23 01:19:50 UTC 2010 - sndirsch@novell.com diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index f72c49a..656b1e8 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -1,5 +1,5 @@ # -# spec file for package xorg-x11-server (Version 7.5_1.9.0.902) +# spec file for package xorg-x11-server (Version 7.5_1.9.1) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -20,7 +20,7 @@ %define moblin 0 Name: xorg-x11-server -%define dirsuffix 1.9.0.902 +%define dirsuffix 1.9.1 %define vnc 0 BuildRequires: Mesa-devel bison flex fontconfig-devel freetype2-devel ghostscript-library libdrm-devel libopenssl-devel pkgconfig xorg-x11 xorg-x11-devel xorg-x11-fonts-devel xorg-x11-libICE-devel xorg-x11-libSM-devel xorg-x11-libX11-devel xorg-x11-libXau-devel xorg-x11-libXdmcp-devel xorg-x11-libXext-devel xorg-x11-libXfixes-devel xorg-x11-libXmu-devel xorg-x11-libXp-devel xorg-x11-libXpm-devel xorg-x11-libXprintUtil-devel xorg-x11-libXrender-devel xorg-x11-libXt-devel xorg-x11-libXv-devel xorg-x11-libfontenc-devel xorg-x11-libxkbfile-devel xorg-x11-proto-devel xorg-x11-xtrans-devel ### udev support (broken on openSUSE 11.2, see also bnc #589997)