From 27249d9b78979476e7fcab27dd9a5399cbfef6a5 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 30 2021 16:37:34 +0000 Subject: import xorg-x11-server-1.20.10-1.el8 --- diff --git a/.gitignore b/.gitignore index 5db85a0..3c72a61 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/xorg-server-1.20.8.tar.bz2 +SOURCES/xorg-server-1.20.10.tar.bz2 diff --git a/.xorg-x11-server.metadata b/.xorg-x11-server.metadata index 1bae2ad..672ec7b 100644 --- a/.xorg-x11-server.metadata +++ b/.xorg-x11-server.metadata @@ -1 +1 @@ -077d081f912faf11c87ea1c9d0e29490961b0cd4 SOURCES/xorg-server-1.20.8.tar.bz2 +e698b30adb781dfe0e7bee0aa489ea9df404a5db SOURCES/xorg-server-1.20.10.tar.bz2 diff --git a/SOURCES/0001-present-wnmd-Keep-pixmap-pointer-in-present_wnmd_cle.patch b/SOURCES/0001-present-wnmd-Keep-pixmap-pointer-in-present_wnmd_cle.patch deleted file mode 100644 index c6ae2eb..0000000 --- a/SOURCES/0001-present-wnmd-Keep-pixmap-pointer-in-present_wnmd_cle.patch +++ /dev/null @@ -1,37 +0,0 @@ -From f32c851a0ba41f5d8d0f8c869bc394858de721df Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michel=20D=C3=A4nzer?= -Date: Thu, 25 Jun 2020 18:09:27 +0200 -Subject: [PATCH xserver 1/4] present/wnmd: Keep pixmap pointer in - present_wnmd_clear_window_flip -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The comment was incorrect: Any reference held by the window (see -present_wnmd_execute) is in addition to the one in struct present_vblank -(see present_vblank_create). So if we don't drop the latter, the pixmap -will be leaked. - -Reviewed-by: Dave Airlie -(cherry picked from commit bc9dd1c71c3722284ffaa7183f4119151b25a44f) -Signed-off-by: Michel Dänzer ---- - present/present_screen.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/present/present_screen.c b/present/present_screen.c -index c7e37c5fd..c435f55f4 100644 ---- a/present/present_screen.c -+++ b/present/present_screen.c -@@ -122,8 +122,6 @@ present_wnmd_clear_window_flip(WindowPtr window) - - xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->idle_queue, event_queue) { - present_pixmap_idle(vblank->pixmap, vblank->window, vblank->serial, vblank->idle_fence); -- /* The pixmap will be destroyed by freeing the window resources. */ -- vblank->pixmap = NULL; - present_vblank_destroy(vblank); - } - --- -2.26.2 - diff --git a/SOURCES/0001-xfree86-Only-switch-to-original-VT-if-it-is-active.patch b/SOURCES/0001-xfree86-Only-switch-to-original-VT-if-it-is-active.patch new file mode 100644 index 0000000..aeed6f6 --- /dev/null +++ b/SOURCES/0001-xfree86-Only-switch-to-original-VT-if-it-is-active.patch @@ -0,0 +1,136 @@ +From ff91c696ff8f5f56da40e107cb5c321539758a81 Mon Sep 17 00:00:00 2001 +From: Michal Srb +Date: Tue, 16 Oct 2018 09:32:13 +0200 +Subject: [PATCH xserver] xfree86: Only switch to original VT if it is active. + +If the X server is terminated while its VT is not active, it should +not change the current VT. + +v2: Query current state in xf86CloseConsole using VT_GETSTATE instead of + keeping track in xf86VTEnter/xf86VTLeave/etc. +--- + hw/xfree86/os-support/linux/lnx_init.c | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + +diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c +index 039dc4a4d..358d89f0f 100644 +--- a/hw/xfree86/os-support/linux/lnx_init.c ++++ b/hw/xfree86/os-support/linux/lnx_init.c +@@ -272,101 +272,111 @@ xf86OpenConsole(void) + xf86SetConsoleHandler(drain_console, NULL); + } + + nTty = tty_attr; + nTty.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP); + nTty.c_oflag = 0; + nTty.c_cflag = CREAD | CS8; + nTty.c_lflag = 0; + nTty.c_cc[VTIME] = 0; + nTty.c_cc[VMIN] = 1; + cfsetispeed(&nTty, 9600); + cfsetospeed(&nTty, 9600); + tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty); + } + } + else { /* serverGeneration != 1 */ + if (!xf86Info.ShareVTs && xf86Info.autoVTSwitch) { + /* now get the VT */ + if (!switch_to(xf86Info.vtno, "xf86OpenConsole")) + FatalError("xf86OpenConsole: Switching VT failed\n"); + } + } + } + + #pragma GCC diagnostic pop + + void + xf86CloseConsole(void) + { + struct vt_mode VT; ++ struct vt_stat vts; + int ret; + + if (xf86Info.ShareVTs) { + close(xf86Info.consoleFd); + return; + } + + /* + * unregister the drain_console handler + * - what to do if someone else changed it in the meantime? + */ + xf86SetConsoleHandler(NULL, NULL); + + /* Back to text mode ... */ + SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT)); + if (ret < 0) + xf86Msg(X_WARNING, "xf86CloseConsole: KDSETMODE failed: %s\n", + strerror(errno)); + + SYSCALL(ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode)); + tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr); + + SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT)); + if (ret < 0) + xf86Msg(X_WARNING, "xf86CloseConsole: VT_GETMODE failed: %s\n", + strerror(errno)); + else { + /* set dflt vt handling */ + VT.mode = VT_AUTO; + SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_SETMODE, &VT)); + if (ret < 0) + xf86Msg(X_WARNING, "xf86CloseConsole: VT_SETMODE failed: %s\n", + strerror(errno)); + } + + if (xf86Info.autoVTSwitch) { + /* +- * Perform a switch back to the active VT when we were started +- */ ++ * Perform a switch back to the active VT when we were started if our ++ * vt is active now. ++ */ + if (activeVT >= 0) { +- switch_to(activeVT, "xf86CloseConsole"); ++ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETSTATE, &vts)); ++ if (ret < 0) { ++ xf86Msg(X_WARNING, "xf86OpenConsole: VT_GETSTATE failed: %s\n", ++ strerror(errno)); ++ } else { ++ if (vts.v_active == xf86Info.vtno) { ++ switch_to(activeVT, "xf86CloseConsole"); ++ } ++ } + activeVT = -1; + } + } + close(xf86Info.consoleFd); /* make the vt-manager happy */ + } + + #define CHECK_FOR_REQUIRED_ARGUMENT() \ + if (((i + 1) >= argc) || (!argv[i + 1])) { \ + ErrorF("Required argument to %s not specified\n", argv[i]); \ + UseMsg(); \ + FatalError("Required argument to %s not specified\n", argv[i]); \ + } + + int + xf86ProcessArgument(int argc, char *argv[], int i) + { + /* + * Keep server from detaching from controlling tty. This is useful + * when debugging (so the server can receive keyboard signals. + */ + if (!strcmp(argv[i], "-keeptty")) { + KeepTty = TRUE; + return 1; + } + + if ((argv[i][0] == 'v') && (argv[i][1] == 't')) { + if (sscanf(argv[i], "vt%2d", &xf86Info.vtno) == 0) { + UseMsg(); + xf86Info.vtno = -1; + return 0; +-- +2.18.4 + diff --git a/SOURCES/0002-present-wnmd-Free-flip_queue-entries-in-present_wnmd.patch b/SOURCES/0002-present-wnmd-Free-flip_queue-entries-in-present_wnmd.patch deleted file mode 100644 index 6bce17f..0000000 --- a/SOURCES/0002-present-wnmd-Free-flip_queue-entries-in-present_wnmd.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 732507ed3255dff3970c5f92bd6ea13bf877e637 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michel=20D=C3=A4nzer?= -Date: Thu, 25 Jun 2020 18:11:31 +0200 -Subject: [PATCH xserver 2/4] present/wnmd: Free flip_queue entries in - present_wnmd_clear_window_flip -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When present_wnmd_clear_window_flip is done, present_destroy_window -frees struct present_window_priv, and the events in the flip queue -become unreachable. So if we don't free them first, they're leaked. - -Also drop the call to present_wnmd_set_abort_flip, which just sets a -flag in struct present_window_priv and thus can't have any observable -effect after present_destroy_window. - -Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1042 -Reviewed-by: Dave Airlie -(cherry picked from commit 1bdedc8dbb9d035b85444c2558a137470ff52113) -Signed-off-by: Michel Dänzer ---- - present/present_screen.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/present/present_screen.c b/present/present_screen.c -index c435f55f4..bfd30b8ba 100644 ---- a/present/present_screen.c -+++ b/present/present_screen.c -@@ -115,9 +115,9 @@ present_wnmd_clear_window_flip(WindowPtr window) - present_window_priv_ptr window_priv = present_window_priv(window); - present_vblank_ptr vblank, tmp; - -- if (window_priv->flip_pending) { -- present_wnmd_set_abort_flip(window); -- window_priv->flip_pending->window = NULL; -+ xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->flip_queue, event_queue) { -+ present_pixmap_idle(vblank->pixmap, vblank->window, vblank->serial, vblank->idle_fence); -+ present_vblank_destroy(vblank); - } - - xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->idle_queue, event_queue) { --- -2.26.2 - diff --git a/SOURCES/0003-xwayland-Always-use-xwl_present_free_event-for-freei.patch b/SOURCES/0003-xwayland-Always-use-xwl_present_free_event-for-freei.patch deleted file mode 100644 index 7925adc..0000000 --- a/SOURCES/0003-xwayland-Always-use-xwl_present_free_event-for-freei.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 99e9854c5fab7114b26c272088d9202548da55bf Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michel=20D=C3=A4nzer?= -Date: Fri, 19 Jun 2020 18:14:35 +0200 -Subject: [PATCH xserver 3/4] xwayland: Always use xwl_present_free_event for - freeing Present events -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Minor cleanup, and will make the next change simpler. No functional -change intended. - -Reviewed-by: Dave Airlie -(cherry picked from commit 1beffba699e2cc3f23039d2177c025bc127966de) -Signed-off-by: Michel Dänzer ---- - hw/xwayland/xwayland-present.c | 27 ++++++++++++--------------- - 1 file changed, 12 insertions(+), 15 deletions(-) - -diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c -index 5ba7dce08..492e4a876 100644 ---- a/hw/xwayland/xwayland-present.c -+++ b/hw/xwayland/xwayland-present.c -@@ -111,6 +111,13 @@ xwl_present_reset_timer(struct xwl_present_window *xwl_present_window) - } - } - -+static void -+xwl_present_free_event(struct xwl_present_event *event) -+{ -+ xorg_list_del(&event->list); -+ free(event); -+} -+ - void - xwl_present_cleanup(WindowPtr window) - { -@@ -128,17 +135,15 @@ xwl_present_cleanup(WindowPtr window) - } - - /* Clear remaining events */ -- xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->event_list, list) { -- xorg_list_del(&event->list); -- free(event); -- } -+ xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->event_list, list) -+ xwl_present_free_event(event); - - /* Clear remaining buffer releases and inform Present about free ressources */ - event = xwl_present_window->sync_flip; - xwl_present_window->sync_flip = NULL; - if (event) { - if (event->buffer_released) { -- free(event); -+ xwl_present_free_event(event); - } else { - event->pending = FALSE; - event->abort = TRUE; -@@ -160,13 +165,6 @@ xwl_present_cleanup(WindowPtr window) - free(xwl_present_window); - } - --static void --xwl_present_free_event(struct xwl_present_event *event) --{ -- xorg_list_del(&event->list); -- free(event); --} -- - static void - xwl_present_buffer_release(void *data, struct wl_buffer *buffer) - { -@@ -216,7 +214,7 @@ xwl_present_msc_bump(struct xwl_present_window *xwl_present_window) - /* If the buffer was already released, clean up now */ - present_wnmd_event_notify(xwl_present_window->window, event->event_id, - xwl_present_window->ust, msc); -- free(event); -+ xwl_present_free_event(event); - } else { - xorg_list_add(&event->list, &xwl_present_window->release_queue); - } -@@ -392,8 +390,7 @@ xwl_present_abort_vblank(WindowPtr present_window, - - xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->event_list, list) { - if (event->event_id == event_id) { -- xorg_list_del(&event->list); -- free(event); -+ xwl_present_free_event(event); - return; - } - } --- -2.26.2 - diff --git a/SOURCES/0004-xwayland-Free-all-remaining-events-in-xwl_present_cl.patch b/SOURCES/0004-xwayland-Free-all-remaining-events-in-xwl_present_cl.patch deleted file mode 100644 index ab526e7..0000000 --- a/SOURCES/0004-xwayland-Free-all-remaining-events-in-xwl_present_cl.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 1466a4fdfa8156dd4fd8b6ee6acd1b44f72ee3b1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michel=20D=C3=A4nzer?= -Date: Fri, 19 Jun 2020 18:10:18 +0200 -Subject: [PATCH xserver 4/4] xwayland: Free all remaining events in - xwl_present_cleanup -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -At the end of xwl_present_cleanup, these events aren't reachable -anymore, so if we don't free them first, they're leaked. - -(cherry picked from commit 64565ea344fef0171497952ef75f019cb420fe3b) - -v2: -* Simpler backport, no need to keep a reference to the pixmap on the - 1.20 branch. - -Signed-off-by: Michel Dänzer ---- - hw/xwayland/xwayland-present.c | 26 +++++++++++--------------- - 1 file changed, 11 insertions(+), 15 deletions(-) - -diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c -index 492e4a876..2cec63f59 100644 ---- a/hw/xwayland/xwayland-present.c -+++ b/hw/xwayland/xwayland-present.c -@@ -114,6 +114,12 @@ xwl_present_reset_timer(struct xwl_present_window *xwl_present_window) - static void - xwl_present_free_event(struct xwl_present_event *event) - { -+ if (!event) -+ return; -+ -+ if (event->buffer) -+ wl_buffer_set_user_data(event->buffer, NULL); -+ - xorg_list_del(&event->list); - free(event); - } -@@ -138,21 +144,10 @@ xwl_present_cleanup(WindowPtr window) - xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->event_list, list) - xwl_present_free_event(event); - -- /* Clear remaining buffer releases and inform Present about free ressources */ -- event = xwl_present_window->sync_flip; -- xwl_present_window->sync_flip = NULL; -- if (event) { -- if (event->buffer_released) { -- xwl_present_free_event(event); -- } else { -- event->pending = FALSE; -- event->abort = TRUE; -- } -- } -- xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->release_queue, list) { -- xorg_list_del(&event->list); -- event->abort = TRUE; -- } -+ xwl_present_free_event(xwl_present_window->sync_flip); -+ -+ xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->release_queue, list) -+ xwl_present_free_event(event); - - /* Clear timer */ - xwl_present_free_timer(xwl_present_window); -@@ -353,6 +348,7 @@ xwl_present_queue_vblank(WindowPtr present_window, - return BadAlloc; - - event->event_id = event_id; -+ event->buffer = NULL; - event->xwl_present_window = xwl_present_window; - event->target_msc = msc; - --- -2.26.2 - diff --git a/SPECS/xorg-x11-server.spec b/SPECS/xorg-x11-server.spec index f33660f..66ad4aa 100644 --- a/SPECS/xorg-x11-server.spec +++ b/SPECS/xorg-x11-server.spec @@ -45,8 +45,8 @@ Summary: X.Org X11 X server Name: xorg-x11-server -Version: 1.20.8 -Release: 3%{?gitdate:.%{gitdate}}%{?dist} +Version: 1.20.10 +Release: 1%{?gitdate:.%{gitdate}}%{?dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -99,13 +99,6 @@ Patch15: 0001-xfree86-LeaveVT-from-xf86CrtcCloseScreen.patch Patch16: 0001-xfree86-try-harder-to-span-on-multihead.patch Patch18: 0001-mustard-Work-around-broken-fbdev-headers.patch -# Xwayland / Present leak fixes from -# https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/459 -Patch20: 0001-present-wnmd-Keep-pixmap-pointer-in-present_wnmd_cle.patch -Patch21: 0002-present-wnmd-Free-flip_queue-entries-in-present_wnmd.patch -Patch22: 0003-xwayland-Always-use-xwl_present_free_event-for-freei.patch -Patch23: 0004-xwayland-Free-all-remaining-events-in-xwl_present_cl.patch - # fix to be upstreamed Patch100: 0001-linux-Make-platform-device-probe-less-fragile.patch Patch102: 0001-xfree86-ensure-the-readlink-buffer-is-null-terminate.patch @@ -114,6 +107,7 @@ Patch102: 0001-xfree86-ensure-the-readlink-buffer-is-null-terminate.patch Patch200: 0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch Patch201: 0001-linux-Fix-platform-device-PCI-detection-for-complex-.patch Patch202: 0001-modesetting-Reduce-glamor-initialization-failed-mess.patch +Patch203: 0001-xfree86-Only-switch-to-original-VT-if-it-is-active.patch BuildRequires: systemtap-sdt-devel BuildRequires: git @@ -386,6 +380,7 @@ autoreconf -f -v --install || exit 1 --without-dtrace \ --disable-linux-acpi --disable-linux-apm \ --enable-xselinux --enable-record --enable-present \ + --enable-xcsecurity \ --enable-config-udev \ --disable-unit-tests \ --enable-dmx \ @@ -557,6 +552,39 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete %changelog +* Thu Dec 10 2020 Adam Jackson - 1.20.10-1 +- xserver 1.20.10 + Resolves: #1891871 + +* Wed Dec 9 2020 Michel Dänzer - 1.20.8-10 +- modesetting: keep going if a modeset fails on EnterVT + Resolves: #1838392 + +* Mon Nov 16 2020 Adam Jackson - 1.20.8-9 +- CVE fix for: CVE-2020-14347 (#1862320) + +* Thu Oct 29 2020 Michel Dänzer - 1.20.8-8 +- CVE fixes for: CVE-2020-14345 (#1872391), CVE-2020-14346 (#1872395), + CVE-2020-14361 (#1872402), CVE-2020-14362 (#1872409) + +* Tue Oct 27 2020 Adam Jackson - 1.20.8-7 +- Enable XC-SECURITY + Resolves: #1863142 + +* Thu Aug 20 2020 Michel Dänzer - 1.20.8-6 +- xfree86: add drm modes on non-GTF panels + Resolves: #1823461 + +* Tue Aug 4 2020 Michel Dänzer - 1.20.8-5 +- xwayland: Hold a pixmap reference in struct xwl_present_event + Related: #1728684 +- glamor: Fix glamor_poly_fill_rect_gl xRectangle::width/height handling + Resolves: #1740250 + +* Fri Jul 10 2020 Ray Strode - 1.20.8-4 +- Don't switch VTs in the exit path, if killed on inactive VT + Related: #1618481 + * Fri Jun 26 2020 Michel Dänzer - 1.20.8-3 - Downgrade modesetting "glamor initialization failed" X_ERROR → X_INFO Resolves: #1724573