aboutsummaryrefslogtreecommitdiffstats
path: root/xorg-server-hwcursor-gamma
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-09-14 18:09:37 +0200
committerMattias Andrée <maandree@operamail.com>2015-09-14 18:09:37 +0200
commit892616b31a52c26295d077725dc6aa59ad1105fd (patch)
treeb975d26bd655aa2af546d5c933016be499a481e7 /xorg-server-hwcursor-gamma
parenticu-48 is being replace by icu48 (diff)
downloadaur-packages-892616b31a52c26295d077725dc6aa59ad1105fd.tar.gz
aur-packages-892616b31a52c26295d077725dc6aa59ad1105fd.tar.bz2
aur-packages-892616b31a52c26295d077725dc6aa59ad1105fd.tar.xz
update xorg-server-hwcursor-gamma
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'xorg-server-hwcursor-gamma')
-rw-r--r--xorg-server-hwcursor-gamma/0001-glamor-make-current-in-prepare-paths.patch34
-rw-r--r--xorg-server-hwcursor-gamma/0001-os-make-sure-the-clientsWritable-fd_set-is-initializ.patch63
-rw-r--r--xorg-server-hwcursor-gamma/PKGBUILD13
3 files changed, 108 insertions, 2 deletions
diff --git a/xorg-server-hwcursor-gamma/0001-glamor-make-current-in-prepare-paths.patch b/xorg-server-hwcursor-gamma/0001-glamor-make-current-in-prepare-paths.patch
new file mode 100644
index 0000000..6167395
--- /dev/null
+++ b/xorg-server-hwcursor-gamma/0001-glamor-make-current-in-prepare-paths.patch
@@ -0,0 +1,34 @@
+From 422a9f7f37eb6027fa4d20a4be208978832be6d6 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Wed, 15 Jul 2015 17:54:03 +1000
+Subject: [PATCH] glamor: make current in prepare paths
+
+Lots of the accel paths only make current once they start
+doing someting, so a lot of them call the bail paths without
+make current, which means on PRIME systems for example
+we end up in the wrong context.
+
+Add a prepare pixmap in the prepare fallback path.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90667
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+---
+ glamor/glamor_prepare.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/glamor/glamor_prepare.c b/glamor/glamor_prepare.c
+index 9bfc557..68fb58f 100644
+--- a/glamor/glamor_prepare.c
++++ b/glamor/glamor_prepare.c
+@@ -45,6 +45,8 @@ glamor_prep_pixmap_box(PixmapPtr pixmap, glamor_access_t access, BoxPtr box)
+ if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(priv))
+ return TRUE;
+
++ glamor_make_current(glamor_priv);
++
+ RegionInit(&region, box, 1);
+
+ /* See if it's already mapped */
+--
+2.4.3
+
diff --git a/xorg-server-hwcursor-gamma/0001-os-make-sure-the-clientsWritable-fd_set-is-initializ.patch b/xorg-server-hwcursor-gamma/0001-os-make-sure-the-clientsWritable-fd_set-is-initializ.patch
new file mode 100644
index 0000000..b3a7d2e
--- /dev/null
+++ b/xorg-server-hwcursor-gamma/0001-os-make-sure-the-clientsWritable-fd_set-is-initializ.patch
@@ -0,0 +1,63 @@
+From 7cc7ffd25d5e50b54cb942d07d4cb160f20ff9c5 Mon Sep 17 00:00:00 2001
+From: Martin Peres <martin.peres@linux.intel.com>
+Date: Fri, 17 Jul 2015 17:21:26 +0300
+Subject: [PATCH] os: make sure the clientsWritable fd_set is initialized
+ before use
+
+In WaitForSomething(), the fd_set clientsWritable may be used unitialized when
+the boolean AnyClientsWriteBlocked is set in the WakeupHandler(). This leads to
+a crash in FlushAllOutput() after x11proto's commit
+2c94cdb453bc641246cc8b9a876da9799bee1ce7.
+
+The problem did not manifest before because both the XFD_SIZE and the maximum
+number of clients were set to 256. As the connectionTranslation table was
+initalized for the 256 clients to 0, the test on the index not being 0 was
+aborting before dereferencing the client #0.
+
+As of commit 2c94cdb453bc641246cc8b9a876da9799bee1ce7 in x11proto, the XFD_SIZE
+got bumped to 512. This lead the OutputPending fd_set to have any fd above 256
+to be uninitialized which in turns lead to reading an index after the end of
+the ConnectionTranslation table. This index would then be used to find the
+client corresponding to the fd marked as pending writes and would also result
+to an out-of-bound access which would usually be the fatal one.
+
+Fix this by zeroing the clientsWritable fd_set at the beginning of
+WaitForSomething(). In this case, the bottom part of the loop, which would
+indirectly call FlushAllOutput, will not do any work but the next call to
+select will result in the execution of the right codepath. This is exactly what
+we want because we need to know the writable clients before handling them. In
+the end, it also makes sure that the fds above MaxClient are initialized,
+preventing the crash in FlushAllOutput().
+
+Thanks to everyone involved in tracking this one down!
+
+Reported-by: Karol Herbst <freedesktop@karolherbst.de>
+Reported-by: Tobias Klausmann <tobias.klausmann@mni.thm.de>
+Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
+Tested-by: Martin Peres <martin.peres@linux.intel.com>
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91316
+Cc: Ilia Mirkin <imirkin@alum.mit.edu>
+Cc: Martin Peres <martin.peres@linux.intel.com>
+Cc: Olivier Fourdan <ofourdan@redhat.com
+Cc: Adam Jackson <ajax@redhat.com>
+Cc: Alan Coopersmith <alan.coopersmith@oracle.com
+Cc: Chris Wilson <chris@chris-wilson.co.uk>
+---
+ os/WaitFor.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/os/WaitFor.c b/os/WaitFor.c
+index 431f1a6..993c14e 100644
+--- a/os/WaitFor.c
++++ b/os/WaitFor.c
+@@ -158,6 +158,7 @@ WaitForSomething(int *pClientsReady)
+ Bool someReady = FALSE;
+
+ FD_ZERO(&clientsReadable);
++ FD_ZERO(&clientsWritable);
+
+ if (nready)
+ SmartScheduleStopTimer();
+--
+2.4.5
+
diff --git a/xorg-server-hwcursor-gamma/PKGBUILD b/xorg-server-hwcursor-gamma/PKGBUILD
index 753ad39..8035ab9 100644
--- a/xorg-server-hwcursor-gamma/PKGBUILD
+++ b/xorg-server-hwcursor-gamma/PKGBUILD
@@ -5,7 +5,7 @@
_pkgname=xorg-server
pkgname=xorg-server-hwcursor-gamma
pkgver=1.17.2
-pkgrel=1
+pkgrel=2
pkgdesc="Xorg X server with patch to apply gamma ramps on hardware cursors"
depends=(libepoxy libxdmcp libxfont libpciaccess libdrm pixman libgcrypt libxau xorg-server-common xf86-input-evdev libxshmfence libgl)
provides=("xorg-server=${pkgver}" 'X-ABI-VIDEODRV_VERSION=19' 'X-ABI-XINPUT_VERSION=21.1' 'X-ABI-EXTENSION_VERSION=9.0' 'x-server')
@@ -27,6 +27,8 @@ source=(${url}/releases/individual/xserver/${_pkgname}-${pkgver}.tar.bz2
xvfb-run.1
0001-dix-Add-unaccelerated-valuators-to-the-ValuatorMask.patch
0002-dix-hook-up-the-unaccelerated-valuator-masks.patch
+ 0001-glamor-make-current-in-prepare-paths.patch
+ 0001-os-make-sure-the-clientsWritable-fd_set-is-initializ.patch
0001-When-an-cursor-is-set-it-is-adjusted-to-use-the.patch
0002-Fix-for-full-and-semi-transparency-under-negative-im.patch
0003-Use-Harms-s-suggest-do-not-use-inline-if.-And-fix-si.patch)
@@ -36,6 +38,8 @@ sha256sums=('f61120612728f2c5034671d0ca3e2273438c60aba93b3dda4a8aa40e6a257993'
'2460adccd3362fefd4cdc5f1c70f332d7b578091fb9167bf88b5f91265bbd776'
'3dc795002b8763a7d29db94f0af200131da9ce5ffc233bfd8916060f83a8fad7'
'416a1422eed71efcebb1d893de74e7f27e408323a56c4df003db37f5673b3f96'
+ '793579adbef979088cadc0fd9ce0c24df0455a6936d3de7a9356df537b7d9a81'
+ 'efc05c06af2bfdf588ef7a60b44c1d180fb353b1bffdfdf96415d63690b6e394'
'bea348631dedd66475d84ac2cfe0840f22a80a642b4680d73fead4749e47f055'
'be9169b937b5d0b44f7f05d7c08aaa5f0c1092e128ce261d9cb350f09dfe1fb0'
'0a643ae83e03faee0f4db669a33c5b3c99edbba5c86cde2c83962ae536d31081')
@@ -51,11 +55,16 @@ prepare() {
msg2 'Fix FS#45229, merged upstream'
patch -Np1 -i ../0001-dix-Add-unaccelerated-valuators-to-the-ValuatorMask.patch
patch -Np1 -i ../0002-dix-hook-up-the-unaccelerated-valuator-masks.patch
+
+ msg2 "Fix FS#45009, merged upstream"
+ patch -Np1 -i ../0001-glamor-make-current-in-prepare-paths.patch
+ patch -Np1 -i ../0001-os-make-sure-the-clientsWritable-fd_set-is-initializ.patch
+
+ autoreconf -fvi
}
build() {
cd "${_pkgname}-${pkgver}"
- autoreconf -fi
./configure --prefix=/usr \
--enable-ipv6 \
--enable-dri \