Commit c1cc62c0 authored by Eric Vidal's avatar Eric Vidal 💬
Browse files

upgpkg : 1.20.1-2

parent 2b23edee
From ec7e2b54c5b4a34b2a077082967bc3ead30e227e Mon Sep 17 00:00:00 2001
From: Alexander Volkov <a.volkov@rusbitech.ru>
Date: Tue, 5 Jun 2018 13:05:39 +0300
Subject: [PATCH] Xext/shm: Refuse to work for remote clients
Avoid access to System V shared memory segment on the X server side
for clients forwarded via SSH. Also prevent them from hanging while
waiting for the reply from the ShmCreateSegment request.
v2: Allow ShmQueryVersion request even for remote clients
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=11080
Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Laurent Carlier <lordheavym@gmail.com>
---
Xext/shm.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/Xext/shm.c b/Xext/shm.c
index fc8441c..896a966 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -1302,9 +1302,14 @@ static int
ProcShmDispatch(ClientPtr client)
{
REQUEST(xReq);
- switch (stuff->data) {
- case X_ShmQueryVersion:
+
+ if (stuff->data == X_ShmQueryVersion)
return ProcShmQueryVersion(client);
+
+ if (!client->local)
+ return BadRequest;
+
+ switch (stuff->data) {
case X_ShmAttach:
return ProcShmAttach(client);
case X_ShmDetach:
@@ -1461,9 +1466,14 @@ static int _X_COLD
SProcShmDispatch(ClientPtr client)
{
REQUEST(xReq);
- switch (stuff->data) {
- case X_ShmQueryVersion:
+
+ if (stuff->data == X_ShmQueryVersion)
return SProcShmQueryVersion(client);
+
+ if (!client->local)
+ return BadRequest;
+
+ switch (stuff->data) {
case X_ShmAttach:
return SProcShmAttach(client);
case X_ShmDetach:
--
2.17.1
From 3ebef6ab850675e1091df2125ebdfbb147436e6c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
Date: Fri, 1 Jun 2018 11:57:15 +0200
Subject: exa: Use PictureMatchFormat for source-only picture format
description
Their pFormat member is NULL, which resulted in a crash in
miRenderColorToPixel.
Fixes: 8171d4c2d67b "render: Store and use all 16bpc of precision for
solid pixels (v2.1)"
Reviewed-by: Adam Jackson <ajax@redhat.com>
---
exa/exa_render.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/exa/exa_render.c b/exa/exa_render.c
index 50a9a65..9fbfdfc 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -291,7 +291,8 @@ exaTryDriverSolidFill(PicturePtr pSrc,
pixel = exaGetPixmapFirstPixel(pSrcPix);
}
else
- miRenderColorToPixel(pSrc->pFormat,
+ miRenderColorToPixel(PictureMatchFormat(pDst->pDrawable->pScreen, 32,
+ pSrc->format),
&pSrc->pSourcePict->solidFill.fullcolor,
&pixel);
--
cgit v1.1
......@@ -6,8 +6,8 @@
pkgbase=xorg-server
pkgname=('xorg-server-rootless' 'xorg-server-xephyr-rootless' 'xorg-server-xdmx-rootless' 'xorg-server-xvfb-rootless'
'xorg-server-xnest-rootless' 'xorg-server-xwayland-rootless' 'xorg-server-common-rootless' 'xorg-server-devel-rootless')
pkgver=1.20.0
pkgrel=5
pkgver=1.20.1
pkgrel=2
arch=('x86_64')
license=('custom')
groups=('xorg')
......@@ -26,14 +26,8 @@ source=(https://xorg.freedesktop.org/releases/individual/xserver/${pkgbase}-${pk
xserver-autobind-hotplug.patch
xvfb-run # with updates from FC master
xvfb-run.1
xserver-1-2-glamor-Always-return-0-from-glamor_fds_from_pixmap-on-error.patch
xserver-2-2-glamor-Propagate-glamor_fds_from_pixmap-error-in-glamor_fd_from_pixmap.patch
0001-v2-FS-58644.patch
0002-fix-libshadow-2.patch
0003_Use_PictureMatchFormat_for_source-only_picture_format.diff
0001-Xext-shm-Refuse-to-work-for-remote-clients.patch
meson-Add-configuration-of-listening-on-tcp-unix-and-local.patch
xserver-modesetting-use-drmmode_bo_import-for-rotate_fb.patch)
0002-fix-libshadow-2.patch)
validpgpkeys=('7B27A3F1A6E18CD9588B4AE8310180050905E40C'
'C383B778255613DFDB409D91DB221A6900000011'
'DD38563A8A8224537D1F90E45B8A2D50A0ECD0D3'
......@@ -64,26 +58,10 @@ prepare() {
# https://bugs.freedesktop.org/show_bug.cgi?id=106588
patch -Np1 -i ../0001-v2-FS-58644.patch
# Fix XWayland hangs - FS#58705
# https://patchwork.freedesktop.org/series/43618/
patch -Np1 -i ../xserver-1-2-glamor-Always-return-0-from-glamor_fds_from_pixmap-on-error.patch
patch -Np1 -i ../xserver-2-2-glamor-Propagate-glamor_fds_from_pixmap-error-in-glamor_fd_from_pixmap.patch
# Fix libshadow.so: libfb.so => not found - FS#58731
# https://bugs.freedesktop.org/show_bug.cgi?id=106656
patch -Np1 -i ../0002-fix-libshadow-2.patch
# FS#i58662
patch -Np1 -i ../0003_Use_PictureMatchFormat_for_source-only_picture_format.diff
# Display incorrect when rotated 90 degree - FS#58637
patch -Np1 -i ../xserver-modesetting-use-drmmode_bo_import-for-rotate_fb.patch
# xserver by default listens on tcp sockets - FS#59025
patch -Np1 -i ../meson-Add-configuration-of-listening-on-tcp-unix-and-local.patch
# SSH X11 forwarding no longer works for Qt apps - FS#58962
patch -Np1 -i ../0001-Xext-shm-Refuse-to-work-for-remote-clients.patch
}
build() {
......@@ -166,9 +144,9 @@ package_xorg-server-rootless() {
#_install fakeinstall/usr/lib/Xorg{,.wrap}
_install fakeinstall/usr/lib/xorg/modules/*
_install fakeinstall/usr/share/X11/xorg.conf.d/10-quirks.conf
_install fakeinstall/usr/share/man/man1/{Xorg,Xorg.wrap,cvt,gtf}.1.gz
_install fakeinstall/usr/share/man/man1/{Xorg,cvt,gtf}.1.gz
_install fakeinstall/usr/share/man/man4/{exa,fbdevhw,modesetting}.4.gz
_install fakeinstall/usr/share/man/man5/{Xwrapper.config,xorg.conf,xorg.conf.d}.5.gz
_install fakeinstall/usr/share/man/man5/{xorg.conf,xorg.conf.d}.5.gz
# distro specific files must be installed in /usr/share/X11/xorg.conf.d
install -m755 -d "${pkgdir}/etc/X11/xorg.conf.d"
......
diff --git a/include/meson.build b/include/meson.build
index f76f557..dfca3c3 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -153,10 +153,10 @@ conf_data.set('BUSFAULT', conf_data.get('HAVE_SIGACTION'))
conf_data.set('_XTYPEDEF_POINTER', '1')
conf_data.set('_XITYPEDEF_POINTER', '1')
+conf_data.set('LISTEN_TCP', get_option('listen_tcp'))
+conf_data.set('LISTEN_UNIX', get_option('listen_unix'))
+conf_data.set('LISTEN_LOCAL', get_option('listen_local'))
# XXX: Configurable?
-conf_data.set('LISTEN_TCP', '1')
-conf_data.set('LISTEN_UNIX', '1')
-conf_data.set('LISTEN_LOCAL', '1')
conf_data.set('XTRANS_SEND_FDS', '1')
conf_data.set('TCPCONN', '1')
diff --git a/meson_options.txt b/meson_options.txt
index 86fca46..3453b8d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -45,6 +45,13 @@ option('vendor_name_short', type: 'string', value: 'X.Org')
option('vendor_web', type: 'string', value: 'http://wiki.x.org')
option('os_vendor', type: 'string', value: '')
+option('listen_tcp', type: 'boolean', value: false,
+ description: 'Listen on TCP by default')
+option('listen_unix', type: 'boolean', value: true,
+ description: 'Listen on Unix by default')
+option('listen_local', type: 'boolean', value: true,
+ description: 'Listen on local by default')
+
option('int10', type: 'combo', choices: ['stub', 'x86emu', 'vm86', 'auto', 'false'],
value: 'auto',
description: 'Xorg int10 backend (default: usually x86emu)')
diff --git a/glamor/glamor.c b/glamor/glamor.c
index d984d20f3..e2c74d17a 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -836,20 +836,20 @@ glamor_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds,
glamor_get_screen_private(pixmap->drawable.pScreen);
if (!glamor_priv->dri3_enabled)
- return -1;
+ return 0;
switch (pixmap_priv->type) {
case GLAMOR_TEXTURE_DRM:
case GLAMOR_TEXTURE_ONLY:
if (!glamor_pixmap_ensure_fbo(pixmap, pixmap->drawable.depth == 30 ?
GL_RGB10_A2 : GL_RGBA, 0))
- return -1;
+ return 0;
return glamor_egl_fds_from_pixmap(screen, pixmap, fds,
strides, offsets,
modifier);
default:
break;
}
- return -1;
+ return 0;
}
_X_EXPORT int
diff --git a/glamor/glamor.c b/glamor/glamor.c
index e2c74d17a..63f0947fa 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -865,17 +865,15 @@ glamor_fd_from_pixmap(ScreenPtr screen,
&modifier);
/* Pixmaps with multi-planes/modifier are not supported in this interface */
- if (ret > 1) {
- while (ret > 0)
- close(fds[--ret]);
- return -1;
+ if (ret == 1 && offsets[0] == 0) {
+ *stride = strides[0];
+ *size = pixmap->drawable.height * *stride;
+ return fds[0];
}
- ret = fds[0];
- *stride = strides[0];
- *size = pixmap->drawable.height * *stride;
-
- return ret;
+ while (ret > 0)
+ close(fds[--ret]);
+ return -1;
}
_X_EXPORT int
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 859a21a9d..ec11b3f56 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1794,11 +1794,8 @@ drmmode_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
return NULL;
}
- ret = drmModeAddFB(drmmode->fd, width, height, crtc->scrn->depth,
- drmmode->kbpp,
- drmmode_bo_get_pitch(&drmmode_crtc->rotate_bo),
- drmmode_bo_get_handle(&drmmode_crtc->rotate_bo),
- &drmmode_crtc->rotate_fb_id);
+ ret = drmmode_bo_import(drmmode, &drmmode_crtc->rotate_bo,
+ &drmmode_crtc->rotate_fb_id);
if (ret) {
ErrorF("failed to add rotate fb\n");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment