Timo Aaltonen pushed to branch debian-unstable at X Strike Force / xserver / xorg-server
Commits: 4b6fce59 by Olivier Fourdan at 2020-09-08T10:50:30+02:00 Revert "linux: Fix platform device probe for DT-based PCI" This reverts commit 249a12c54a9316b089bd22683c011519348496df. https://gitlab.freedesktop.org/xorg/xserver/-/issues/1068 - - - - - 39cb95e9 by Olivier Fourdan at 2020-09-08T10:50:34+02:00 Revert "linux: Fix platform device PCI detection for complex bus topologies" This reverts commit 5c96eb5f44e62a4cfe835023cde304eb5795b8fd. https://gitlab.freedesktop.org/xorg/xserver/-/issues/1068 - - - - - af4c84ce by Olivier Fourdan at 2020-09-08T10:50:38+02:00 Revert "linux: Make platform device probe less fragile" This reverts commit 74b7427c41b4e4104af7abf70a996c086d3d7628. https://gitlab.freedesktop.org/xorg/xserver/-/issues/1068 - - - - - b28c8828 by Arthur Williams at 2020-09-25T04:52:57+00:00 include: Increase the number of max. input devices to 256. Extending the decade old f0124ed93, to increase the number of input devices from 40 to 256. 40 translates at most 9 MD, while 256 will allow 63 MD. It is an arbitrary number, but people are hitting the current limit under reasonable conditions. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64793 Signed-off-by: Arthur Williams <[email protected]> (cherry picked from commit fe439596b99db65bbae35eff1ea0b79db167f8d6) - - - - - 8c3c8bda by Michel Dänzer at 2020-09-30T15:06:30+00:00 glamor: Fix glamor_poly_fill_rect_gl xRectangle::width/height handling (Using GLSL 1.30 or newer) The width/height members of xRectangle are unsigned, but they were being interpreted as signed when converting to floating point for the vertex shader, producing incorrect drawing for values > 32767. v2: * Use separate GL_UNSIGNED_SHORT vertex attribute for width/height. (Eric Anholt) Reviewed-by: Eric Anholt <[email protected]> (cherry picked from commit 032af35657aa95c6bbdb74ff8c72e535b9b56cfa) - - - - - 1e84fda2 by Michel Dänzer at 2020-09-30T15:06:30+00:00 xfree86: Take second reference for SavedCursor in xf86CursorSetCursor The same pointer is kept in CurrentCursor as well, therefore two RefCursor calls are needed. Fixes use-after-free after switching VTs. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1067 (cherry picked from commit 919f1f46fc67dae93b2b3f278fcbfc77af34ec58) - - - - - f4006d79 by Michel Dänzer at 2020-09-30T15:06:30+00:00 present/wnmd: Can't use page flipping for windows clipped by children Noticed this was missing while working on the following fix. v2: * Dropped present_wnmd_can_window_flip hunk (that function is never called, will be cleaned up in a follow-up MR). Reviewed-by: Olivier Fourdan <[email protected]> # v1 Reviewed-by: Roman Gilg <[email protected]> (cherry picked from commit 7ac303c7b1e3b1be79ba3648e217798683e65a99) - - - - - 51ee6e5c by Michel Dänzer at 2020-09-30T15:06:30+00:00 xwayland: Check window pixmap in xwl_present_check_flip2 We can only flip if the window pixmap matches that of the toplevel window. Doing so regardless could cause the toplevel window pixmap to get destroyed while it was still referenced by the window, resulting in use-after-free and likely a crash. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1033 Reviewed-by: Olivier Fourdan <[email protected]> Reviewed-by: Roman Gilg <[email protected]> (cherry picked from commit 4c25356d6cd908c5030c70e712076dff318ac00d) - - - - - 174cb91d by Michel Dänzer at 2020-09-30T15:06:30+00:00 present/wnmd: Remove dead check from present_wnmd_check_flip present_wnmd_toplvl_pixmap_window returns a window with the same window pixmap, so the check could never fail. Reviewed-by: Roman Gilg <[email protected]> (cherry picked from commit b6b1161fd7ac409156fb69439897bcabdeacf393) - - - - - d108c2c8 by Olivier Fourdan at 2020-09-30T15:06:30+00:00 xwayland: Do not discard frame callbacks on allow commits Currently, when a X11 client (usually the X11 window manager from a Wayland compositor) changes the value of the X11 property `_XWAYLAND_ALLOW_COMMITS` from `false` to `true`, all pending frame callbacks on the window are discarded so that the commit occurs immediately. Weston uses that mechanism to prevent the content of the window from showing before it's ready when mapping the window initially, but discarding the pending frame callbacks has no effect on the initial mapping of the X11 window since at that point there cannot be any frame callback on a surface which hasn't been committed yet anyway. However, discarding pending frame callbacks can be problematic if we were to use the same `_XWAYLAND_ALLOW_COMMITS` mechanism to prevent damages to be posted before the X11 toplevel is updated completely (including the window decorations from the X11 window manager). Remove the portion of code discarding the pending frame callback, Xwayland should always wait for a pending frame callback if there's one before posting new damages. Signed-off-by: Olivier Fourdan <[email protected]> Reviewed-by: Pekka Paalanen <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> https://gitlab.freedesktop.org/xorg/xserver/merge_requests/333 (cherry picked from commit 66da95a172c4941b75ffedcdaa0138c0a48f11fb) - - - - - 1ac389dd by Greg V at 2020-10-01T08:29:01+00:00 xwayland: use drmGetNodeTypeFromFd for checking if a node is a render one Major/minor numbers are a.. major (ha) source of pain in FreeBSD porting. In this case, Xwayland was thinking that /dev/dri/card0 is already a render node, because the st_rdev on FreeBSD was passing the Linux-style check, and because of the assumption, acceleration would fail because various ioctls like AMDGPU_INFO would be denied on the non-render node. Switch to libdrm's function that already works correctly on all platforms. Signed-off-by: Greg V <[email protected]> Reviewed-by: Emmanuel Vadot <[email protected]> (cherry picked from commit 239ebdc9e447d4f836d0c2aa6068c6064fffb46c) - - - - - 1930ed23 by Olivier Fourdan at 2020-10-01T08:29:01+00:00 xwayland: Remove pending stream reference when freeing The EGLStream backend keeps a queue of pending streams for each Xwayland window. However, when this pending queue is freed, the corresponding private data may not be cleared (typically if the pixmap for this window has changed before the compositor finished attaching the consumer for the window's pixmap's original eglstream), leading to a use-after-free and a crash when trying to use that data as the window pixmap. Make sure to clear the private data when the pending stream is freed. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1055 Signed-off-by: Olivier Fourdan <[email protected]> Tested-by: Karol Szuster <[email protected]> Reviewed-by: Adam Jackson <[email protected]> (cherry picked from commit a5f439dcd21b4fda093cb382bb1a758b434a1444) - - - - - dae234ef by Michel Dänzer at 2020-10-08T08:36:42+00:00 present: Move flip target_msc adjustment out of present_vblank_create Preparation for different handling between SCMD & WNMD. No functional change intended. Reviewed-by: Roman Gilg <[email protected]> Tested-by: Roman Gilg <[email protected]> (cherry picked from commit 4c92dea952f7fed19857904f0f552900257ef4b9) - - - - - 669e4039 by Michel Dänzer at 2020-10-08T08:36:42+00:00 present: Add present_vblank::exec_msc field For tracking the MSC when the present can be executed separately from the target MSC. Allows removing the requeue field instead, plus more later. v2: * Rename wait_msc → exec_msc (Roman Gilg) * Use exec_msc = target_msc instead of exec_msc++, for clarity. * Bug fix: Set exec_msc = target_msc also if present_flip returned false in present_execute. v3: * Set exec_msc = target_msc also if present_wnmd_flip returned false in present_wnmd_execute, for consistency. v4: * Specifically check for exec_msc == crtc_msc + 1 in present_execute_wait/copy, to avoid re-introducing https://bugs.freedesktop.org/show_bug.cgi?id=94596 . Reviewed-by: Roman Gilg <[email protected]> Tested-by: Roman Gilg <[email protected]> (cherry picked from commit b0b3159abd8001fa3f6dfc44a288a95a62aa5cf6) - - - - - 96ef31e0 by Michel Dänzer at 2020-10-08T08:36:42+00:00 present/wnmd: Move up present_wnmd_queue_vblank Allowing it to be called from more functions than before. No functional change. Reviewed-by: Roman Gilg <[email protected]> Tested-by: Roman Gilg <[email protected]> (cherry picked from commit d14ea667feccf085c7d66a7c63f380975e07af66) - - - - - c3e4c1a0 by Michel Dänzer at 2020-10-08T08:36:42+00:00 present/wnmd: Execute copies at target_msc-1 already It always takes one update cycle for the copy to become visible on the host windowing system, so waiting for the target MSC resulted in 1 cycle delay. We re-use the idle list for copies which were executed but need their completion event sent. Fixes black seams when resizing the "Builder" sub-window of GDK_BACKEND=x11 gtk4-demo on Xwayland (see https://gitlab.gnome.org/GNOME/mutter/-/issues/1290#note_873557). Unfortunately, this cannot completely fix the seams with apps which queue up multiple frames in advance, since there's always at least one queued frame corresponding to the old window size. But it should at least help a little in that case as well. v2: * Bug fix: Don't update exec_msc in present_wnmd_check_flip_window. (Roman Gilg) * Use exec_msc = target_msc - 1 instead of exec_msc--, and add a comment, for clarity. v3: * Drop exec_msc = target_msc again in present_wnmd_execute. * present_execute_copy should never set vblank->queued in present_wnmd_execute now, so replace that branch with an assertion. (Roman Gilg) Reviewed-by: Roman Gilg <[email protected]> Tested-by: Roman Gilg <[email protected]> (cherry picked from commit 1cccb486d48a5d2e7649836b993805bb65dc09e3) [Since present_wnmd_event_notify hasn't been split up on the 1.20 branch, it needs to check vblank->flip. Doing the same in present_wnmd_free_idle_vblanks to be safe, though I'm not sure it's actually possible to hit non-flips there.] - - - - - d6c389cb by Bernhard Übelacker at 2020-11-02T12:57:55+00:00 os: Fix instruction pointer written in xorg_backtrace The address retrieved in "pip.start_ip" is not necessarily the same address as unw_get_proc_name finds as nearest symbol and returns in "off". Therefore using "pip.start_ip + off" is not reliable, at least visible in the binaries from the Debian repository. Bug-Debian: https://bugs.debian.org/971088 Signed-off-by: Bernhard Übelacker <[email protected]> (cherry picked from commit c15dd0ba4893f79f7181e783cb1ba404edca917a) - - - - - b3ae038c by Alex Goins at 2020-11-04T11:33:21-08:00 glamor: Update pixmap's devKind when making it exportable When making a pixmap exportable, glamor will currently create a temporary exported pixmap backed by a GBM bo, with the devKind updated to the stride of the bo. However, when the backing of the exported pixmap is swapped into the original, the devKind of the original is not updated. Some GBM bos may get implicitly padded, in which case the devKind of the pixmap will not match the stride of the backing bo. For example, an 800x600 pixmap will have a devKind of 3200, but the bo's stride will be 3328. This can cause corruption with PRIME, when the sink uses the wrong stride to display the shared pixmap. This commit changes glamor_make_pixmap_exportable() to update the devKind of the original pixmap after it swaps exported pixmap's backing into it, keeping everything consistent. Fixes issue #1018. Signed-off-by: Alex Goins <[email protected]> Signed-off-by: Aaron Plattner <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> (cherry picked from commit 7a7e55c5c1d6461a9f4d9a4e0129c1c6e1fd3d66) - - - - - 0811a9ff by Olivier Fourdan at 2020-11-09T11:35:30+01:00 xwayland: non-rootless requires the wl_shell protocol When running non-rootless, Xwayland requires that the Wayland compositor supports the wl_shell protocol. Check for wl_shell protocol support at startup and exit cleanly if missing rather than segfaulting later in ensure_surface_for_window() while trying to use wl_shell_get_shell_surface(). Signed-off-by: Olivier Fourdan <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Simon Ser <[email protected]> (cherry picked from commit ffd02d9b26bd560849c407a6dd4f5c4d7d2c1736) - - - - - 253569a3 by Olivier Fourdan at 2020-11-09T11:35:30+01:00 xwayland: Create an xwl_window for toplevel only One general assumption in Xwayland is that the xwl_window remains the same for all the child windows of the toplevel window. When mapping a new X11 window, ensure_surface_for_window() checks for an existing xwl_window by using xwl_window_get() which will just check for the registered xwl_window for the window. That means that a client mapping a child window of an existing window with a xwl_window will get another different xwl_window. If an X11 client issues a Present request on the parent window, hence placed underneath its child window of the same size, the Wayland compositor may not send the frame callback event for the parent's Wayland surface which is reckoned to be not visible, obscured behind the other Wayland surface for the child X11 window. That bug affects some games running in wine which may get 1 fps because the repaint occurs only on timeout with a long interval (as with, e.g. https://bugs.winehq.org/show_bug.cgi?id=47066) Fix ensure_surface_for_window() by using xwl_window_from_window() which will walk the window tree, so that a child window won't get another xwl_window than its parent. https://gitlab.freedesktop.org/xorg/xserver/-/issues/1099 See-also: https://bugs.winehq.org/show_bug.cgi?id=47066 Signed-off-by: Olivier Fourdan <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> (cherry picked from commit 606ba7fc51e5420646f75c4e672fbe61eb7c7e6e) - - - - - 5c400cae by Olivier Fourdan at 2020-11-09T11:35:30+01:00 configure: Build hashtable for Xres and glvnd With autoconf, hashtable support is built along with Xres support. Yet, glvnd also use it, so when disabling Xres from configure, the build will fail at link time because hashtable functions are not available. Untie the build of hashtable from Xres support, just like meson build does. Signed-off-by: Olivier Fourdan <[email protected]> Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1091 (cherry picked from commit 899cebb76ab7754fea49f7babcd64a7e94052cc8) - - - - - bd0f5372 by Martin Peres at 2020-12-01T11:10:34+01:00 modesetting: check the kms state on EnterVT Normally, we would receive a uevent coming from Linux's DRM subsystem, which would trigger the check for disappearing/appearing resources. However, this event is not received when X is not master (another VT is selected), and so the userspace / desktop environment would not be notified about the changes that happened while X wasn't master. To fix the issue, this patch forces a refresh on EnterVT by splitting the kms-checking code from the uevent handling into its own (exported) function called drmmode_update_kms_state. This function is then called from both the uevent-handling function, and on EnterVT right before restoring the modes. Signed-off-by: Martin Peres <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Acked-by: Kishore Kadiyala <[email protected]> Tested-by: Kishore Kadiyala <[email protected]> (cherry picked from commit 293cf660c95d7ba36510bcc4114d7fd5c5f3801c) - - - - - 54f9af1c by Kishore Kadiyala at 2020-12-01T11:13:51+01:00 modesetting: keep going if a modeset fails on EnterVT There was a time when setting a mode on a CRTC would not depend on the associated connector's state. If a mode had been set successfully once, it would mean it would work later on. This changed with the introduction of new connectors type that now require a link training sequence (DP, HDMI 2.0), and that means that some events may have happened while the X server was not master that would then prevent the mode from successfully be restored to its previous state. This patch relaxes the requirement that all modes should be restored on EnterVT, or the entire X-Server would go down by allowing modesets to fail (with some warnings). If a modeset fails, the CRTC will be disabled, and a RandR event will be sent for the desktop environment to fix the situation as well as possible. Additional patches might be needed to make sure that the user would never be left with all screens black in some scenarios. v2 (Martin Peres): - whitespace fixes - remove the uevent handling (it is done in a previous patch) - improve the commit message - reduce the size of the patch by not changing lines needlessly - return FALSE if one modeset fails in ignore mode - add comments/todos to explain why we do things - disable the CRTCs that failed the modeset Signed-off-by: Kishore Kadiyala <[email protected]> Signed-off-by: Martin Peres <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Tested-by: Kishore Kadiyala <[email protected]> Closes: #1010 (cherry picked from commit efb3abddd49fb75bd6d0e31046fed43d258c93da) - - - - - 440ed594 by Michel Dänzer at 2020-12-01T11:25:31+01:00 present/wnmd: Translate update region to screen space The region as passed in is in the source pixmap's coordinate space, so intersecting it with the clipList (which is in screen space) resulted in disappointment. Fixes Firefox popups such as the hamburger menu when using the EGL backend. v2: * Drop vblank->x/y_off from RegionTranslate call, since they're always 0 here (present_wnmd_check_flip rejects flips for x/y_off != 0). Reported-by: Robert Mader <[email protected]> Tested-by: Robert Mader <[email protected]> Reviewed-by: Olivier Fourdan <[email protected]> Tested-by: Joakim Tjernlund <[email protected]> # v1 (cherry picked from commit 466b8b43fb355c6040cee45406860b8b8c04e948) - - - - - 7ccb3b0e by Matthieu Herrb at 2020-12-01T16:21:33+00:00 Fix XkbSetDeviceInfo() and SetDeviceIndicators() heap overflows ZDI-CAN 11389 / CVE-2020-25712 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb <[email protected]> (cherry picked from commit 87c64fc5b0db9f62f4e361444f4b60501ebf67b9) - - - - - 06d1a032 by Matthieu Herrb at 2020-12-01T16:21:33+00:00 Check SetMap request length carefully. Avoid out of bounds memory accesses on too short request. ZDI-CAN 11572 / CVE-2020-14360 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb <[email protected]> (cherry picked from commit 446ff2d3177087b8173fa779fa5b77a2a128988b) - - - - - bc111a2e by Matt Turner at 2020-12-01T16:25:37+00:00 xserver 1.20.10 Signed-off-by: Matt Turner <[email protected]> - - - - - 82133aa9 by Timo Aaltonen at 2020-12-02T10:22:23+02:00 Merge branch 'upstream-unstable' into debian-unstable - - - - - aec80b89 by Timo Aaltonen at 2020-12-02T10:23:20+02:00 bump the version - - - - - 4a914d99 by Timo Aaltonen at 2020-12-02T11:54:03+02:00 Drop patches: - 0001-Revert-*: Reverted upstream in this version - revert-hw-xfree86-avoid-cursor-use-after-free.diff: Issue fixed in this version - revert-disabling-xss-for-rootless-xwayland.diff: Was resolved upstream as being a client bug - - - - - 66d9b05f by Timo Aaltonen at 2020-12-02T12:20:22+02:00 control: Add libnvidia-egl-wayland-dev to build-depends, enables EGLStream support in xwayland. - - - - - cc7e61a5 by Timo Aaltonen at 2020-12-02T12:22:16+02:00 rules: Add a workaround to fix build on mips*. (Closes: #975579) - - - - - 30 changed files: - Xext/Makefile.am - config/udev.c - configure.ac - debian/changelog - debian/control - − debian/patches/0001-Revert-linux-Fix-platform-device-PCI-detection-for-c.patch - − debian/patches/0001-Revert-linux-Fix-platform-device-probe-for-DT-based-.patch - − debian/patches/0001-Revert-linux-Make-platform-device-probe-less-fragile.patch - − debian/patches/revert-disabling-xss-for-rootless-xwayland.diff - − debian/patches/revert-hw-xfree86-avoid-cursor-use-after-free.diff - debian/patches/series - debian/rules - glamor/glamor_egl.c - glamor/glamor_rects.c - glx/Makefile.am - hw/xfree86/drivers/modesetting/driver.c - hw/xfree86/drivers/modesetting/drmmode_display.c - hw/xfree86/drivers/modesetting/drmmode_display.h - hw/xfree86/os-support/linux/lnx_platform.c - hw/xfree86/ramdac/xf86CursorRD.c - hw/xwayland/xwayland-glamor-eglstream.c - hw/xwayland/xwayland-glamor-gbm.c - hw/xwayland/xwayland-present.c - hw/xwayland/xwayland.c - include/misc.h - meson.build - os/backtrace.c - present/present_execute.c - present/present_priv.h - present/present_scmd.c The diff was not included because it is too large. View it on GitLab: https://salsa.debian.org/xorg-team/xserver/xorg-server/-/compare/750ecee07415f31d38bb7b26280cb37641fe6bd3...cc7e61a5a5742dbd909311782ee26644dfdf43e3 -- View it on GitLab: https://salsa.debian.org/xorg-team/xserver/xorg-server/-/compare/750ecee07415f31d38bb7b26280cb37641fe6bd3...cc7e61a5a5742dbd909311782ee26644dfdf43e3 You're receiving this email because of your account on salsa.debian.org.

