Timo Aaltonen pushed to branch upstream-unstable at X Strike Force / xserver / xorg-server
Commits: a6776111 by Adam Jackson at 2017-12-11T15:21:51-05:00 xfixes: Remove the CursorCurrent array We're not wrapping all the ways a cursor can be destroyed, so this array ends up with stale data. Rather than try harder to wrap more code paths, just look up the cursor when we need it. Signed-off-by: Adam Jackson <[email protected]> (cherry picked from commit aa6651f83c698e8cc40de61aad36c73ca7a6adcf) - - - - - cd5076a5 by Nikolay Martynov at 2017-12-13T10:04:11-05:00 XShmGetImage: fix censoring It looks like offsets calculated during image censoring are wrong. This results in black (empty) images returns. This fix is very similar to 6c6f09aac7f1d1367a042087b7681c7fdf1d1e0f that was applied to XGetImage Visually this fixes chromium/firefox window sharing in multiscreen configurations - without this patch most of the windows on 'secodnary' screens are black. This also should fix https://bugs.freedesktop.org/show_bug.cgi?id=101730. Signed-off-by: Nikolay Martynov <[email protected]> Reviewed-by: Adam Jackson <[email protected]> (cherry picked from commit 885636b7d42b3c7b151fc386d358184db004ce45) - - - - - 4ef1aef0 by Alex Goins at 2017-12-13T10:04:47-05:00 ramdac: Check ScreenPriv != NULL in xf86ScreenSetCursor() Similar to change cba5a10f, xf86ScreenSetCursor() would dereference ScreenPriv without NULL checking it. If Option "SWCursor" is specified, ScreenPriv == NULL. Without this fix, it is observed that setting Option "SWCursor" "on" on the modesetting driver in a PRIME configuration will segfault the server. It is important to return success rather than failure in the instance that ScreenPriv == NULL and pCurs == NullCursor, because otherwise xf86SetCursor() can fall into infinite recursion: xf86SetCursor(pCurs) calls xf86ScreenSetCursor(pCurs), and if FALSE, calls xf86SetCursor(NullCursor). If xf86ScreenSetCursor(NullCursor) returns FALSE, it calls xf86SetCursor(NullCursor) again and this repeats forever. Signed-off-by: Alex Goins <[email protected]> Reviewed-by: Dave Airlie <[email protected]> (cherry picked from commit 68d95e759f8b6ebca6bd52e69e6bc34cc174f8ca) - - - - - e8530b87 by Daniel Martin at 2017-12-13T10:05:36-05:00 modesetting: Fix potential buffer overflow If one misconfigures a ZaphodHeads value (more than 20 characters without a delimiter), we get an overflow of our buffer. Use xstrtokenize() instead of writing/fixing our own tokenizer. Signed-off-by: Daniel Martin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> (cherry picked from commit 04a305121fbc08ecc2ef345ee7155d6087a43fd1) - - - - - e663998f by Daniel Martin at 2017-12-13T10:05:46-05:00 test: input: Fix used uninitialized warning in dix_event_to_core input.c: In function ‘dix_event_to_core’: ../include/inputstr.h:61:55: warning: ‘*((void *)&ev+80)’ is used uninitialized in this function [-Wuninitialized] #define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7))) ^~ Signed-off-by: Daniel Martin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> (cherry picked from commit 0bcc65f2bf479c6a74ac70bb5b5181d6834dded6) - - - - - 8817747c by Daniel Martin at 2017-12-13T10:05:53-05:00 test: signal-logging: Fix looping signed number tests unsigned_tests[] was used to compute the amount of signed numbers to test. Signed-off-by: Daniel Martin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> (cherry picked from commit 15a32ee5d1fffa171bb05af9a0e5b472e4af1488) - - - - - 5a5b6d6c by Peter Hutterer at 2017-12-13T10:06:02-05:00 config/udev: consider ID_INPUT_FOO=0 as 'unset' Historically we didn't need to care about this case but more devices are having invalid types set and they cannot be unset with a hwdb entry (which doesn't handle the empty string). Allow for "0" to mean "unset" because anything else would be crazy anyway. Signed-off-by: Peter Hutterer <[email protected]> (cherry picked from commit 5aad81445c8c3d6b7b30d503cfe26027fa482870) - - - - - c39de5f7 by Eric Anholt at 2017-12-13T10:06:07-05:00 xkb: Print the xkbcomp path being executed when we fail to compile. I don't know how many times I've had a broken server due to a bad directory to xkbcomp, and only finding the whole path has shown me where I went wrong. Reviewed-by: Peter Hutterer <[email protected]> (cherry picked from commit 30f4d440ebc3517fdcc1d3c6a422a8fbf3af1f23) - - - - - c3285706 by Giuseppe Bilotta at 2017-12-13T10:06:44-05:00 xkb: initialize tsyms This fixes some “Conditional jump depends on uninitialized value(s)” errors spotted by valgrind. Reviewed-by: Eric Engestrom <[email protected]> Signed-off-by: Giuseppe Bilotta <[email protected]> (cherry picked from commit b2167015043a458e9cf93b827b43eb5b7c552ce9) - - - - - c010bcb8 by Giuseppe Bilotta at 2017-12-13T10:06:49-05:00 randr: ProcRRGetOutputInfo: initialize memory Running Xephyr under valgrind reveals that we're sending some uninitialized memory over the wire (particularly, the leftover padding that comes from rounding extraLen to the next 32-bit multiple). Solve by calloc()ing the memory instead of malloc()ing (the alternative would be to memset just the padding, but I'm not sure it's more convenient.) Signed-off-by: Giuseppe Bilotta <[email protected]> Reviewed-by: Adam Jackson <[email protected]> (cherry picked from commit bb766ef11227bd8c71ac65845d1930edd0eda40d) - - - - - b3fa60ed by Adam Jackson at 2017-12-13T10:07:07-05:00 glx: Fix typos that break GLX_ARB_context_flush_control The trailing \n are just wrong here, __glXEnableExtension wants a string without them. Signed-off-by: Adam Jackson <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Emil Velikov <[email protected]> (cherry picked from commit fd0eafb18426da14601d5c0d0a50092c49a7aff8) - - - - - d1a2a275 by Hector Martin at 2017-12-13T10:07:17-05:00 edid: fix off-by-one error in CEA mode numbering The CEA extension short video descriptors contain the VIC, which starts at 1, not 0. Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Hector Martin <[email protected]> (cherry picked from commit 68556d74b49e99d3490166c446079f7d5de26ca4) - - - - - ece2e82e by Adam Jackson at 2017-12-13T10:07:24-05:00 glx: Only flush indirect contexts in MakeCurrent (v2) If the context is direct none of the GL commands were issued by this process, the server couldn't flush them even if it wanted to. v2: Fix embarassingly obvious boolean inversion (Michel Dänzer) Signed-off-by: Adam Jackson <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> (cherry picked from commit 307c124d6bcfe26057767b2c0990dc9ac66b9c93) - - - - - a4bd27bd by Giuseppe Bilotta at 2017-12-13T10:07:32-05:00 randr: rrGetScreenResources: initialize memory Similarly to bb766ef11227bd8c71ac65845d1930edd0eda40d, ensure that the extra padding is set to 0. Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Giuseppe Bilotta <[email protected]> (cherry picked from commit fb5ee77b91a93e27801006be8ee34d27984e7fa6) - - - - - 5c00e693 by Michel Dänzer at 2017-12-13T10:08:00-05:00 present: Only send PresentCompleteNotify events to the presenting client We were sending the events to all clients listening for them on the window. But clients can get confused by events from another client, and I can't imagine any case where receiving events from other clients would be required. v2: * Also restrict events sent to additional windows to the presenting client * Don't shorten line lengths Reviewed-by: Keith Packard <[email protected]> (cherry picked from commit 559954aaa8d811a22cf918cc16a7d618e12201a0) - - - - - ee64427c by Daniel Martin at 2017-12-13T10:08:06-05:00 os/xdmcp: Honour -once when session is dead Terminate a dead session when -once was passed. Don't restart it. Signed-off-by: Daniel Martin <[email protected]> Reviewed-by: Walter Harms <[email protected]> (cherry picked from commit 918afeecbc63d70413e222efdb2ac4cfb16eae9e) - - - - - b832dac7 by Adam Jackson at 2017-12-13T10:08:40-05:00 glx: Fix glXQueryContext for GLX_FBCONFIG_ID and GLX_RENDER_TYPE (v2) Just never filled in, oops. Seems to have gone unnoticed because normally glXQueryContext simply returns the values filled in by the client library when the context was created. The only path by which you normally get to a GLXQueryContext request is glXImportContext, and then only if the context is already indirect. However, that's a statement about Mesa's libGL (and anything else that inherited that bit of the SGI SI more or less intact). Nothing prevents a mischeivous client from issuing that request of a direct context, and if they did we'd be in trouble because we never bothered to preserve the associated fbconfig in the context state, so we'd crash looking up GLX_VISUAL_ID_EXT. So let's fix that too. v2: Fixed missing preservation of the config in DRI2 (Eric Anholt) Signed-off-by: Adam Jackson <[email protected]> Reviewed-by: Eric Anholt <[email protected]> (cherry picked from commit 5d667df6ea1634191a26f9a7c26bc883701d62b0) - - - - - f9a55653 by Olivier Fourdan at 2017-12-13T10:08:45-05:00 xwayland: Fix non-argb cursor conversion >From the bug: "What happens if bits->width is less than 8? :)" Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=103012 Signed-off-by: Olivier Fourdan <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> (cherry picked from commit 97ac59b1ed3624f7c04e54dd3e3dadfa46a8f170) - - - - - 072dff82 by Olivier Fourdan at 2017-12-13T10:09:11-05:00 dix: avoid deferencing NULL PtrCtrl PtrCtrl really makes sense for relative pointing device only, absolute devices such as touch devices do not have any PtrCtrl set. In some cases, if the client issues a XGetPointerControl() immediatlely after a ChangeMasterDeviceClasses() copied the touch device to the VCP, a NULL pointer dereference will occur leading to a crash of Xwayland. Check whether the PtrCtrl is not NULL in ProcGetPointerControl() and return the default control values otherwise, to avoid the NULL pointer dereference. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1519533 Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Olivier Fourdan <[email protected]> (cherry picked from commit 9f7a9be13d6449c00c86d3035374f4f543654b3f) - - - - - dbf97534 by Tomasz Śniatowski at 2017-12-13T10:09:20-05:00 os: Fix strtok/free crash in ComputeLocalClient Don't reuse cmd for strtok output to ensure the proper pointer is freed afterwards. The code incorrectly assumed the pointer returned by strtok(cmd, ":") would always point to cmd. However, strtok(str, sep) != str if str begins with sep. This caused an invalid-free crash when running a program under X with a name beginning with a colon. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=104123 Signed-off-by: Tomasz Śniatowski <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> (cherry picked from commit 6883ae43eb72fe4e2651c1dca209563323fad2db) - - - - - c70d8e55 by Adam Jackson at 2017-12-20T15:20:43-05:00 composite: Remove a misleading comment This comment is above compIsAlternateVisual, which used to be the only thing determining whether implicit redirect was needed. It's not anymore due to the redirection exception list. That job is now performed by compImplicitRedirect, whose code is self-explanitory. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Adam Jackson <[email protected]> (cherry picked from commit bccbaf7c113b1300071601879002682ebbe8b1c1) - - - - - 06d1c83d by Adam Jackson at 2017-12-20T15:20:43-05:00 composite: Export compIsAlternateVisual Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Adam Jackson <[email protected]> (cherry picked from commit ef2345aaa28461a76f77c65240ce5facc180f98e) - - - - - 0a73e7bf by Adam Jackson at 2017-12-20T15:20:43-05:00 composite: Make compIsAlternateVisual safe even if Composite is off As of ea483af9 we're calling this unconditionally from the GLX code so the synthetic visual is in a lower select group. If Composite has been disabled then GetCompScreen() will return NULL, and this would crash. Rather than force the caller to check first, just always return FALSE if Composite is disabled (which is correct, since none of the visuals will be synthetic in that case). Signed-off-by: Adam Jackson <[email protected]> Reviewed-by: Aaron Plattner <[email protected]> (cherry picked from commit f80119120c487581ac050ce741808f7c8f438f35) - - - - - 4c64b20a by Adam Jackson at 2017-12-20T15:20:43-05:00 glx: Send GLX_VISUAL_SELECT_GROUP_SGIX attribute for visuals We already send this for fbconfigs. Mesa happens to implement glXChooseVisual relative to the fbconfig data, but that might not be true of NVIDIA's libGL. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Adam Jackson <[email protected]> (cherry picked from commit 43efaa6e4fd903229dc9c508da4177ad4bbdd4d8) - - - - - c64bd21d by Adam Jackson at 2017-12-20T15:20:43-05:00 glx: Move Composite's synthetic visuals to a different select group Should you find yourself using a 16bpp display while also using a compositor, you poor soul, you may find that your GLX applications behave strangely; in particular, glxgears will be transparent. This is because it clears to (0,0,0,0) which is transparent if you honor alpha, and it will choose the synthetic visual because it has the most available r/g/b bits. To avoid this, bump synthetic visuals to a higher (less-preferred) select group. Unless the client explicitly asks for non-zero alpha bits, this will prefer any rgb565 visual ahead of the argb8888 visual. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Adam Jackson <[email protected]> (cherry picked from commit ea483af99a6351323afe00a0b630cd63310efdb1) - - - - - 1726badd by Thomas Hellstrom at 2017-12-20T15:20:43-05:00 glx: Work around a GLX_OML swap method in older dri drivers The swapMethod config member would typically contain an arbitrary value on older dri drivers. Fix this so that if we detect an illegal value, return GLX_SWAP_UNDEFINED_OML. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Adam Jackson <[email protected]> (cherry picked from commit 0fc26310d5b09213c65f50bde444a1758172b016) - - - - - 22b0880d by Thomas Hellstrom at 2017-12-20T15:20:43-05:00 glx: Fix visual fbconfig matching with respect to swap method For the built in visuals, we'd typically select the "best" fbconfig without considering the swap method. If the client then requests a specific swap method, say GLX_SWAP_COPY_OML, it may well happen that the first fbconfig matching requirements would have been paired with the 32-bit compositing visual, and the client would render a potentially transparent window. Fix this so that we try to match fbconfigs with the same swap method to all built-in visuals. That would guarantee that selecting a specific swap- method would not influence the chance of getting a compositing visual. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Adam Jackson <[email protected]> (cherry picked from commit 4486d199bd3bcb5b2b8ad9bc54eb11604d9bd653) - - - - - 91c42093 by Thomas Hellstrom at 2017-12-20T15:20:43-05:00 glx: Duplicate relevant fbconfigs for compositing visuals Previously, before GLX_OML_swap_method was fixed, both the X server and client ignored the swapMethod fbconfig value, which meant that, if the dri driver thought it exposed more than one swapMethod, it actually just exported a duplicated set of fbconfigs. When fixing GLX_OML_swap_method and restricting the choice for built-in visuals to a single swap method that meant we didn't have that many fbconfigs to choose from when pairing the compositing visual with an fbconfig, resulting in the fbconfig paired with the compositing visual becoming too restrictive for some applications, (at least for kwin). This problem would also happen if the dri driver only exposed a single swap method to begin with. So, to make sure the compositing visual gets a good enough fbconfig, duplicate fbconfigs that are suitable for compositing visuals and make sure these duplicated fbconfigs can be used only by compositing visuals. For duplicated fbconfigs not paired with a compositing visual, construct new compositing visuals, making compositing clients able to choose visuals / fbconfig more adapted to their needs. This is in some sense equivalent to adding a new "TRUECOLOR_COMPOSITING" GLX visualtype. Fixes: 4486d199bd3b ("glx: Fix visual fbconfig matching with respect to swap method") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102806 Signed-off-by: Thomas Hellstrom <[email protected]> Tested-By: Nick Sarnie <[email protected]> Tested-by: Fredrik Höglund <[email protected]> Reviewed-by: Adam Jackson <[email protected]> (cherry picked from commit f84e59a4f474d22860bac8aec2947798a86db69b) - - - - - ebfb06b1 by Adam Jackson at 2017-12-20T15:20:43-05:00 xserver 1.19.6 Signed-off-by: Adam Jackson <[email protected]> - - - - - 30 changed files: - Xext/shm.c - composite/compositeext.h - composite/compwindow.c - config/udev.c - configure.ac - dix/devices.c - glx/glxcmds.c - glx/glxdri2.c - glx/glxdricommon.c - glx/glxdriswrast.c - glx/glxscreens.c - glx/glxscreens.h - hw/xfree86/drivers/modesetting/drmmode_display.c - hw/xfree86/modes/xf86EdidModes.c - hw/xfree86/ramdac/xf86HWCurs.c - hw/xquartz/GL/indirect.c - hw/xwayland/xwayland-cursor.c - include/misc.h - os/access.c - os/xdmcp.c - present/present.c - present/present_event.c - present/present_priv.h - present/present_request.c - randr/rroutput.c - randr/rrscreen.c - test/input.c - test/signal-logging.c - xfixes/cursor.c - xkb/ddxLoad.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/b96e982e3a43513549636850186ff80a82190f64...ebfb06b11955a6c32500b7086be912ab96b753a7 --- View it on GitLab: https://salsa.debian.org/xorg-team/xserver/xorg-server/compare/b96e982e3a43513549636850186ff80a82190f64...ebfb06b11955a6c32500b7086be912ab96b753a7 You're receiving this email because of your account on salsa.debian.org.

