ChangeLog | 212 +++++++++++++++++++++++++++++++++++++++ Xext/xace.c | 4 configure.ac | 11 +- debian/changelog | 6 + dix/dispatch.c | 14 +- dix/dixutils.c | 7 - dix/events.c | 2 hw/xfree86/common/xf86Xinput.c | 11 +- hw/xquartz/bundle/Info.plist.cpp | 8 - mi/mibitblt.c | 2 os/backtrace.c | 6 - os/client.c | 118 ++++++++++++++++++--- render/animcur.c | 3 13 files changed, 364 insertions(+), 40 deletions(-)
New commits: commit c8f32b38d01067215a182a00f3fa679dc4f1aa68 Author: Cyril Brulebois <[email protected]> Date: Mon Mar 5 00:35:10 2012 +0100 Upload to unstable. diff --git a/ChangeLog b/ChangeLog index 8ce5296..29c7911 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,215 @@ +commit e597f0119cd69b6d9edf86d06d941468f90d8e6d +Author: Jeremy Huddleston <[email protected]> +Date: Fri Jan 27 21:07:17 2012 -0800 + + configure.ac: 1.11.4 + + Signed-off-by: Jeremy Huddleston <[email protected]> + +commit 6c491463ee7a3637c8aae7ddae9625b36b792078 +Author: Jeremy Huddleston <[email protected]> +Date: Fri Jan 20 23:54:58 2012 -0800 + + 1.11.3.902 (1.11.4 RC2) + + Signed-off-by: Jeremy Huddleston <[email protected]> + +commit b747a91485184649c05aba6fa10734f70e926032 +Author: Jeremy Huddleston <[email protected]> +Date: Wed Jan 18 11:47:21 2012 -0800 + + XQuartz: Bump bundle version to 2.7.1 + + Signed-off-by: Jeremy Huddleston <[email protected]> + +commit a1ed67fa0551ee2b39d002d3b786a2017b37c7ac +Author: Peter Hutterer <[email protected]> +Date: Fri Jan 6 13:20:45 2012 +1000 + + render: don't bother with animated cursors on floating slaves (#39989) + + X.Org Bug 39989 <http://bugs.freedesktop.org/show_bug.cgi?id=39989> + + Signed-off-by: Peter Hutterer <[email protected]> + Reviewed-by: Jeremy Huddleston <[email protected]> + (cherry picked from commit bbb6b8c834e0e1491ca14403b5d0840dd14380d3) + +commit f89c39e6c9e20ffc3c1ae228ee601c2ab9007ff4 +Author: Peter Hutterer <[email protected]> +Date: Mon Jan 9 15:04:10 2012 +1000 + + dix: Update pointer limits for floating devices too (#43635) + + When the screen is restructured, the pointer limits need to be reset for + floating slave devices as well, not just for master pointers. Only skip + devices that don't have a cursor (attached slaves and keyboard) + + Bug reproducer: float an absolute slave device, rotate the screen - the + device is now confined to a section of the screen only. + + X.Org Bug 43635 <http://bugs.freedesktop.org/show_bug.cgi?id=43635> + + Signed-off-by: Peter Hutterer <[email protected]> + Reviewed-by: Chase Douglas <[email protected]> + (cherry picked from commit 35bd77e9d0701daae87d681900d749604fc6471f) + +commit dea9377a257a402b2c7fe4a96c958d951a7d4579 +Author: Zhigang Gong <[email protected]> +Date: Wed Jan 4 07:01:19 2012 +0000 + + mi/mibitblt: Fix an overflow bug of bit shift. + + When depth equal to 32 and planeMask equal to 0, the overflow will + occur and cause the pixmap can't be cleared. There are some test + cases in XTS hit this bug, and this fix can eliminate the corresponding + failures. + + Signed-off-by: Zhigang Gong <[email protected]> + Reviewed-by: Adam Jackson <[email protected]> + Signed-off-by: Keith Packard <[email protected]> + (cherry picked from commit f4956faab9ccf9aba6cf9603f4489f5dad19a347) + +commit d2db5100b1bafeeea8c1febd390631c8f8abb094 +Author: Alan Coopersmith <[email protected]> +Date: Fri Oct 28 21:29:50 2011 -0700 + + Convert DetermineClientCmd to use strdup instead of malloc+strncpy + + *cmdname is initialized to NULL earlier in the function, so it's + okay to overwrite it with NULL if strdup fails, don't need that + extra check. + + Signed-off-by: Alan Coopersmith <[email protected]> + Reviewed-by: Jeremy Huddleston <[email protected]> + (cherry picked from commit 780133f9ae7fada462714b47e79d26075bbd9abe) + +commit 5b28bcb340e279e7f4e76617e86b439092367690 +Author: Adam Jackson <[email protected]> +Date: Tue Dec 13 21:23:12 2011 -0500 + + dix: Tune dixLookupDrawable for success + + The vast vast vast majority of resource lookups are successful. Move some + work to the error paths so we don't punish success. + + Before: + 40000000 trep @ 0.0009 msec (1109091.3/sec): PutImage 10x10 square + 60000000 trep @ 0.0005 msec (2072652.2/sec): ShmPutImage 10x10 square + + After: + 40000000 trep @ 0.0009 msec (1148346.9/sec): PutImage 10x10 square + 60000000 trep @ 0.0005 msec (2091666.1/sec): ShmPutImage 10x10 square + + Reviewed-by: Alan Coopersmith <[email protected]> + Signed-off-by: Adam Jackson <[email protected]> + (cherry picked from commit 8f9bdfd293ad8e45755efe8d764b4dcc2a724f51) + +commit e1ea93fec93b13d18df4451210aaaf322b769b6a +Author: Adam Jackson <[email protected]> +Date: Tue Dec 13 20:23:40 2011 -0500 + + dix: Tune dtrace hooks around Dispatch + + Don't call LookupMajorName if the hooks aren't active, it's quite expensive. + + Before: + 40000000 trep @ 0.0009 msec (1087458.5/sec): PutImage 10x10 square + 60000000 trep @ 0.0005 msec (2012238.6/sec): ShmPutImage 10x10 square + + After: + 40000000 trep @ 0.0009 msec (1109091.3/sec): PutImage 10x10 square + 60000000 trep @ 0.0005 msec (2072652.2/sec): ShmPutImage 10x10 square + + Reviewed-by: Alan Coopersmith <[email protected]> + Signed-off-by: Adam Jackson <[email protected]> + (cherry picked from commit 83a98543b58c661a22574a6f8d8f9d777c0955b8) + +commit 9eaa0b5c89f645c50ea90e07e8b49ebacf4349a0 +Author: Adam Jackson <[email protected]> +Date: Tue Dec 13 21:00:05 2011 -0500 + + xace: ricer tuning for XaceHook + + gcc doesn't want to hoist the check for XaceHooks[hook] != NULL above the + varargs code for some reason, so do it ourselves. + + Before: + 40000000 trep @ 0.0010 msec (1050420.2/sec): PutImage 10x10 square + 60000000 trep @ 0.0005 msec (1921147.6/sec): ShmPutImage 10x10 square + + After: + 40000000 trep @ 0.0009 msec (1087458.5/sec): PutImage 10x10 square + 60000000 trep @ 0.0005 msec (2012238.6/sec): ShmPutImage 10x10 square + + Reviewed-by: Alan Coopersmith <[email protected]> + Signed-off-by: Adam Jackson <[email protected]> + (cherry picked from commit 11977fab546da35d579ebe285e3c26864007805e) + +commit a3b6ecc893e17028cfbe16d8d7981c9037fc0766 +Author: Peter Hutterer <[email protected]> +Date: Tue Jan 3 10:45:45 2012 +1000 + + xfree86: split warning about missing identifier or input driver + + Check for identifier first and bail if it's missing (also remove the current + identifier check after we've already bailed due to missing identifiers) + + If a driver is missing, warn but also say that we may have added this device + already. I see too many bugreports with incorrectly shortened log files. + + Signed-off-by: Peter Hutterer <[email protected]> + Reviewed-by: Cyril Brulebois <[email protected]> + (cherry picked from commit 75953ccb9e9e5f1dbbaa44c714716a0049e22aae) + +commit 4a339afc586d55a9a248b893f007219d79c72600 +Author: Julien Cristau <[email protected]> +Date: Fri Dec 30 20:41:25 2011 +0100 + + os: don't ignore failure from dladdr + + If dladdr returns 0, don't go and use the returned Dl_info, it may + contain garbage. + + X.Org bug#44315 <https://bugs.freedesktop.org/show_bug.cgi?id=44315> + + Reported-and-tested-by: Cyril Brulebois <[email protected]> + Reviewed-by: Jeremy Huddleston <[email protected]> + Reviewed-by: Cyril Brulebois <[email protected]> + Signed-off-by: Julien Cristau <[email protected]> + (cherry picked from commit 6269977c91071e0ea16ca5b4b8e15fd6db0b6fcf) + +commit 9a4be7e99f0e832df87b8e7fb548793dd4b52717 +Author: Matthieu Herrb <[email protected]> +Date: Mon Jan 2 13:23:59 2012 +0000 + + Add OpenBSD support to DetermineClientCmd() + + Uses kvm_getargv() from libkvm. + + Signed-off-by: Matthieu Herrb <[email protected]> + Reviewed-by: Adam Jackson <[email protected]> + Signed-off-by: Keith Packard <[email protected]> + (cherry picked from commit 6d6d4cb6043905d850834946e9bfc526ed5a9ef7) + +commit 8046717d720c1bbbf02ba986622bc96c6b52a36c +Author: Alan Coopersmith <[email protected]> +Date: Sat Dec 24 10:00:56 2011 -0800 + + Add Solaris support to DetermineClientCmd + + Uses /proc/pid/psinfo to read command & partial arguments. + + Moves cmdsize & argsize variables into non-Solaris #else clause + to avoid unused variable warnings. + + Fixes format mismatch errors when building with DEBUG defined on + a 64-bit platform (where Mask is defined as CARD32). + + Signed-off-by: Alan Coopersmith <[email protected]> + Reviewed-by: Rami Ylimäki <[email protected]> + Signed-off-by: Keith Packard <[email protected]> + (cherry picked from commit cfc4c3d7fa8bd4da4c08b2ab8e6f85435f75353a) + commit cea9f9f273cb525cb5daa2d2819d3f635582cb24 Author: Jeremy Huddleston <[email protected]> Date: Fri Jan 6 22:01:03 2012 -0800 diff --git a/debian/changelog b/debian/changelog index 3319a15..ee4a5a7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +xorg-server (2:1.11.4-1) unstable; urgency=low + + * New upstream release. + + -- Cyril Brulebois <[email protected]> Mon, 05 Mar 2012 00:34:57 +0100 + xorg-server (2:1.11.3.901-2) unstable; urgency=high * Revert "XKB: Add debug key actions for grabs & window tree" to stop commit e597f0119cd69b6d9edf86d06d941468f90d8e6d Author: Jeremy Huddleston <[email protected]> Date: Fri Jan 27 21:07:17 2012 -0800 configure.ac: 1.11.4 Signed-off-by: Jeremy Huddleston <[email protected]> diff --git a/configure.ac b/configure.ac index cf37d1a..7a13c4f 100644 --- a/configure.ac +++ b/configure.ac @@ -26,8 +26,8 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ(2.57) -AC_INIT([xorg-server], 1.11.3.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) -RELEASE_DATE="2012-01-20" +AC_INIT([xorg-server], 1.11.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +RELEASE_DATE="2012-01-27" AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE commit 6c491463ee7a3637c8aae7ddae9625b36b792078 Author: Jeremy Huddleston <[email protected]> Date: Fri Jan 20 23:54:58 2012 -0800 1.11.3.902 (1.11.4 RC2) Signed-off-by: Jeremy Huddleston <[email protected]> diff --git a/configure.ac b/configure.ac index 65fbc8c..cf37d1a 100644 --- a/configure.ac +++ b/configure.ac @@ -26,8 +26,8 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ(2.57) -AC_INIT([xorg-server], 1.11.3.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) -RELEASE_DATE="2012-01-06" +AC_INIT([xorg-server], 1.11.3.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +RELEASE_DATE="2012-01-20" AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE commit b747a91485184649c05aba6fa10734f70e926032 Author: Jeremy Huddleston <[email protected]> Date: Wed Jan 18 11:47:21 2012 -0800 XQuartz: Bump bundle version to 2.7.1 Signed-off-by: Jeremy Huddleston <[email protected]> diff --git a/hw/xquartz/bundle/Info.plist.cpp b/hw/xquartz/bundle/Info.plist.cpp index a4b8e19..60251f7 100644 --- a/hw/xquartz/bundle/Info.plist.cpp +++ b/hw/xquartz/bundle/Info.plist.cpp @@ -19,9 +19,9 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>2.7.0</string> + <string>2.7.1</string> <key>CFBundleVersion</key> - <string>2.7.0</string> + <string>2.7.1</string> <key>CFBundleSignature</key> <string>x11a</string> <key>CSResourcesFileMapped</key> @@ -37,9 +37,9 @@ <key>LSApplicationCategoryType</key> <string>public.app-category.utilities</string> <key>NSHumanReadableCopyright</key> - <string>© 2003-2011 Apple Inc. + <string>© 2003-2012 Apple Inc. © 2003 XFree86 Project, Inc. -© 2003-2011 X.org Foundation, Inc. +© 2003-2012 X.org Foundation, Inc. </string> <key>NSMainNibFile</key> <string>main</string> commit a1ed67fa0551ee2b39d002d3b786a2017b37c7ac Author: Peter Hutterer <[email protected]> Date: Fri Jan 6 13:20:45 2012 +1000 render: don't bother with animated cursors on floating slaves (#39989) X.Org Bug 39989 <http://bugs.freedesktop.org/show_bug.cgi?id=39989> Signed-off-by: Peter Hutterer <[email protected]> Reviewed-by: Jeremy Huddleston <[email protected]> (cherry picked from commit bbb6b8c834e0e1491ca14403b5d0840dd14380d3) diff --git a/render/animcur.c b/render/animcur.c index 31cbab9..8d4a9c2 100644 --- a/render/animcur.c +++ b/render/animcur.c @@ -208,6 +208,9 @@ AnimCurDisplayCursor (DeviceIntPtr pDev, AnimCurScreenPtr as = GetAnimCurScreen(pScreen); Bool ret; + if (IsFloating(pDev)) + return FALSE; + Unwrap (as, pScreen, DisplayCursor); if (IsAnimCur(pCursor)) { commit f89c39e6c9e20ffc3c1ae228ee601c2ab9007ff4 Author: Peter Hutterer <[email protected]> Date: Mon Jan 9 15:04:10 2012 +1000 dix: Update pointer limits for floating devices too (#43635) When the screen is restructured, the pointer limits need to be reset for floating slave devices as well, not just for master pointers. Only skip devices that don't have a cursor (attached slaves and keyboard) Bug reproducer: float an absolute slave device, rotate the screen - the device is now confined to a section of the screen only. X.Org Bug 43635 <http://bugs.freedesktop.org/show_bug.cgi?id=43635> Signed-off-by: Peter Hutterer <[email protected]> Reviewed-by: Chase Douglas <[email protected]> (cherry picked from commit 35bd77e9d0701daae87d681900d749604fc6471f) diff --git a/dix/events.c b/dix/events.c index 8e7f9c3..7d2d0e3 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1356,7 +1356,7 @@ ScreenRestructured (ScreenPtr pScreen) for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { - if (!DevHasCursor(pDev)) + if (!IsFloating(pDev) && !DevHasCursor(pDev)) continue; /* GrabDevice doesn't have a confineTo field, so we don't need to commit dea9377a257a402b2c7fe4a96c958d951a7d4579 Author: Zhigang Gong <[email protected]> Date: Wed Jan 4 07:01:19 2012 +0000 mi/mibitblt: Fix an overflow bug of bit shift. When depth equal to 32 and planeMask equal to 0, the overflow will occur and cause the pixmap can't be cleared. There are some test cases in XTS hit this bug, and this fix can eliminate the corresponding failures. Signed-off-by: Zhigang Gong <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Keith Packard <[email protected]> (cherry picked from commit f4956faab9ccf9aba6cf9603f4489f5dad19a347) diff --git a/mi/mibitblt.c b/mi/mibitblt.c index 49e17bd..6e00557 100644 --- a/mi/mibitblt.c +++ b/mi/mibitblt.c @@ -648,7 +648,7 @@ miGetImage( DrawablePtr pDraw, int sx, int sy, int w, int h, depth = pDraw->depth; if(format == ZPixmap) { - if ( (((1<<depth)-1)&planeMask) != (1<<depth)-1 ) + if ( (((1LL<<depth)-1)&planeMask) != (1LL<<depth)-1 ) { ChangeGCVal gcv; xPoint pt; commit d2db5100b1bafeeea8c1febd390631c8f8abb094 Author: Alan Coopersmith <[email protected]> Date: Fri Oct 28 21:29:50 2011 -0700 Convert DetermineClientCmd to use strdup instead of malloc+strncpy *cmdname is initialized to NULL earlier in the function, so it's okay to overwrite it with NULL if strdup fails, don't need that extra check. Signed-off-by: Alan Coopersmith <[email protected]> Reviewed-by: Jeremy Huddleston <[email protected]> (cherry picked from commit 780133f9ae7fada462714b47e79d26075bbd9abe) diff --git a/os/client.c b/os/client.c index aa9be84..fbccf22 100644 --- a/os/client.c +++ b/os/client.c @@ -234,13 +234,7 @@ void DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs) /* Contruct the process name without arguments. */ if (cmdname) { - char *name = malloc(cmdsize); - if (name) - { - strncpy(name, path, cmdsize); - name[cmdsize - 1] = '\0'; - *cmdname = name; - } + *cmdname = strdup(path); } /* Construct the arguments for client process. */ commit 5b28bcb340e279e7f4e76617e86b439092367690 Author: Adam Jackson <[email protected]> Date: Tue Dec 13 21:23:12 2011 -0500 dix: Tune dixLookupDrawable for success The vast vast vast majority of resource lookups are successful. Move some work to the error paths so we don't punish success. Before: 40000000 trep @ 0.0009 msec (1109091.3/sec): PutImage 10x10 square 60000000 trep @ 0.0005 msec (2072652.2/sec): ShmPutImage 10x10 square After: 40000000 trep @ 0.0009 msec (1148346.9/sec): PutImage 10x10 square 60000000 trep @ 0.0005 msec (2091666.1/sec): ShmPutImage 10x10 square Reviewed-by: Alan Coopersmith <[email protected]> Signed-off-by: Adam Jackson <[email protected]> (cherry picked from commit 8f9bdfd293ad8e45755efe8d764b4dcc2a724f51) diff --git a/dix/dixutils.c b/dix/dixutils.c index 1e31346..cfb0397 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -202,13 +202,12 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client, int rc; *pDraw = NULL; - client->errorValue = id; - - if (id == INVALID) - return BadDrawable; rc = dixLookupResourceByClass((pointer *)&pTmp, id, RC_DRAWABLE, client, access); + if (rc != Success) + client->errorValue = id; + if (rc == BadValue) return BadDrawable; if (rc != Success) commit e1ea93fec93b13d18df4451210aaaf322b769b6a Author: Adam Jackson <[email protected]> Date: Tue Dec 13 20:23:40 2011 -0500 dix: Tune dtrace hooks around Dispatch Don't call LookupMajorName if the hooks aren't active, it's quite expensive. Before: 40000000 trep @ 0.0009 msec (1087458.5/sec): PutImage 10x10 square 60000000 trep @ 0.0005 msec (2012238.6/sec): ShmPutImage 10x10 square After: 40000000 trep @ 0.0009 msec (1109091.3/sec): PutImage 10x10 square 60000000 trep @ 0.0005 msec (2072652.2/sec): ShmPutImage 10x10 square Reviewed-by: Alan Coopersmith <[email protected]> Signed-off-by: Adam Jackson <[email protected]> (cherry picked from commit 83a98543b58c661a22574a6f8d8f9d777c0955b8) diff --git a/dix/dispatch.c b/dix/dispatch.c index a13274c..316384a 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -425,9 +425,11 @@ Dispatch(void) client->minorOp = ext->MinorOpcode(client); } #ifdef XSERVER_DTRACE - XSERVER_REQUEST_START(LookupMajorName(client->majorOp), client->majorOp, - ((xReq *)client->requestBuffer)->length, - client->index, client->requestBuffer); + if (XSERVER_REQUEST_START_ENABLED()) + XSERVER_REQUEST_START(LookupMajorName(client->majorOp), + client->majorOp, + ((xReq *)client->requestBuffer)->length, + client->index, client->requestBuffer); #endif if (result > (maxBigRequestSize << 2)) result = BadLength; @@ -438,8 +440,10 @@ Dispatch(void) XaceHookAuditEnd(client, result); } #ifdef XSERVER_DTRACE - XSERVER_REQUEST_DONE(LookupMajorName(client->majorOp), client->majorOp, - client->sequence, client->index, result); + if (XSERVER_REQUEST_DONE_ENABLED()) + XSERVER_REQUEST_DONE(LookupMajorName(client->majorOp), + client->majorOp, client->sequence, + client->index, result); #endif if (client->noClientException != Success) commit 9eaa0b5c89f645c50ea90e07e8b49ebacf4349a0 Author: Adam Jackson <[email protected]> Date: Tue Dec 13 21:00:05 2011 -0500 xace: ricer tuning for XaceHook gcc doesn't want to hoist the check for XaceHooks[hook] != NULL above the varargs code for some reason, so do it ourselves. Before: 40000000 trep @ 0.0010 msec (1050420.2/sec): PutImage 10x10 square 60000000 trep @ 0.0005 msec (1921147.6/sec): ShmPutImage 10x10 square After: 40000000 trep @ 0.0009 msec (1087458.5/sec): PutImage 10x10 square 60000000 trep @ 0.0005 msec (2012238.6/sec): ShmPutImage 10x10 square Reviewed-by: Alan Coopersmith <[email protected]> Signed-off-by: Adam Jackson <[email protected]> (cherry picked from commit 11977fab546da35d579ebe285e3c26864007805e) diff --git a/Xext/xace.c b/Xext/xace.c index c757cad..ef69fe3 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -101,6 +101,10 @@ int XaceHook(int hook, ...) } u; int *prv = NULL; /* points to return value from callback */ va_list ap; /* argument list */ + + if (!XaceHooks[hook]) + return Success; + va_start(ap, hook); /* Marshal arguments for passing to callback. commit a3b6ecc893e17028cfbe16d8d7981c9037fc0766 Author: Peter Hutterer <[email protected]> Date: Tue Jan 3 10:45:45 2012 +1000 xfree86: split warning about missing identifier or input driver Check for identifier first and bail if it's missing (also remove the current identifier check after we've already bailed due to missing identifiers) If a driver is missing, warn but also say that we may have added this device already. I see too many bugreports with incorrectly shortened log files. Signed-off-by: Peter Hutterer <[email protected]> Reviewed-by: Cyril Brulebois <[email protected]> (cherry picked from commit 75953ccb9e9e5f1dbbaa44c714716a0049e22aae) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index d22fdc8..6625545 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -939,15 +939,16 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs, pInfo->attrs = DuplicateInputAttributes(attrs); } - if (!pInfo->driver || !pInfo->name) { - xf86Msg(X_INFO, "No input driver/identifier specified (ignoring)\n"); + if (!pInfo->name) { + xf86Msg(X_INFO, "No identifier specified, ignoring this device.\n"); rval = BadRequest; goto unwind; } - if (!pInfo->name) { - xf86Msg(X_ERROR, "No device identifier specified (ignoring)\n"); - rval = BadMatch; + if (!pInfo->driver) { + xf86Msg(X_INFO, "No input driver specified, ignoring this device.\n"); + xf86Msg(X_INFO, "This device may have been added with another device file.\n"); + rval = BadRequest; goto unwind; } commit 4a339afc586d55a9a248b893f007219d79c72600 Author: Julien Cristau <[email protected]> Date: Fri Dec 30 20:41:25 2011 +0100 os: don't ignore failure from dladdr If dladdr returns 0, don't go and use the returned Dl_info, it may contain garbage. X.Org bug#44315 <https://bugs.freedesktop.org/show_bug.cgi?id=44315> Reported-and-tested-by: Cyril Brulebois <[email protected]> Reviewed-by: Jeremy Huddleston <[email protected]> Reviewed-by: Cyril Brulebois <[email protected]> Signed-off-by: Julien Cristau <[email protected]> (cherry picked from commit 6269977c91071e0ea16ca5b4b8e15fd6db0b6fcf) diff --git a/os/backtrace.c b/os/backtrace.c index 7ca6dab..f3255c7 100644 --- a/os/backtrace.c +++ b/os/backtrace.c @@ -44,7 +44,11 @@ void xorg_backtrace(void) ErrorF("\nBacktrace:\n"); size = backtrace(array, 64); for (i = 0; i < size; i++) { - dladdr(array[i], &info); + int rc = dladdr(array[i], &info); + if (rc == 0) { + ErrorF("%d: ?? [%p]\n", i, array[i]); + continue; + } mod = (info.dli_fname && *info.dli_fname) ? info.dli_fname : "(vdso)"; if (info.dli_saddr) ErrorF("%d: %s (%s+0x%lx) [%p]\n", i, mod, commit 9a4be7e99f0e832df87b8e7fb548793dd4b52717 Author: Matthieu Herrb <[email protected]> Date: Mon Jan 2 13:23:59 2012 +0000 Add OpenBSD support to DetermineClientCmd() Uses kvm_getargv() from libkvm. Signed-off-by: Matthieu Herrb <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Keith Packard <[email protected]> (cherry picked from commit 6d6d4cb6043905d850834946e9bfc526ed5a9ef7) diff --git a/configure.ac b/configure.ac index fdaa583..65fbc8c 100644 --- a/configure.ac +++ b/configure.ac @@ -999,6 +999,13 @@ if test "x$RES" = xyes && test "x$CLIENTIDS" = xyes; then else CLIENTIDS=no fi +if test "x$CLIENTIDS" = xyes; then + case $host_os in + openbsd*) + SYS_LIBS="$SYS_LIBS -lkvm" + ;; + esac +fi AC_MSG_RESULT([$CLIENTIDS]) AM_CONDITIONAL(CLIENTIDS, [test "x$CLIENTIDS" = xyes]) diff --git a/os/client.c b/os/client.c index e297f8c..aa9be84 100644 --- a/os/client.c +++ b/os/client.c @@ -64,6 +64,15 @@ #include <procfs.h> #endif +#ifdef __OpenBSD__ +#include <sys/param.h> +#include <sys/sysctl.h> +#include <sys/types.h> + +#include <kvm.h> +#include <limits.h> +#endif + /** * Try to determine a PID for a client from its connection * information. This should be called only once when new client has @@ -172,7 +181,39 @@ void DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs) if (cmdargs && sp) *cmdargs = strdup(sp); } -#else /* not Solaris */ +#elif defined(__OpenBSD__) + /* on OpenBSD use kvm_getargv() */ + { + kvm_t *kd; + char errbuf[_POSIX2_LINE_MAX]; + char **argv; + struct kinfo_proc *kp; + size_t len = 0; + int i, n; + + kd = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, errbuf); + if (kd == NULL) + return; + kp = kvm_getprocs(kd, KERN_PROC_PID, pid, sizeof(struct kinfo_proc), &n); + if (n != 1) + return; + argv = kvm_getargv(kd, kp, 0); + *cmdname = strdup(argv[0]); + i = 1; + while (argv[i] != NULL) { + len += strlen(argv[i]) + 1; + i++; + } + *cmdargs = calloc(1, len); + i = 1; + while (argv[i] != NULL) { + strlcat(*cmdargs, argv[i], len); + strlcat(*cmdargs, " ", len); + i++; + } + kvm_close(kd); + } +#else /* Linux using /proc/pid/cmdline */ /* Check if /proc/pid/cmdline exists. It's not supported on all * operating systems. */ commit 8046717d720c1bbbf02ba986622bc96c6b52a36c Author: Alan Coopersmith <[email protected]> Date: Sat Dec 24 10:00:56 2011 -0800 Add Solaris support to DetermineClientCmd Uses /proc/pid/psinfo to read command & partial arguments. Moves cmdsize & argsize variables into non-Solaris #else clause to avoid unused variable warnings. Fixes format mismatch errors when building with DEBUG defined on a 64-bit platform (where Mask is defined as CARD32). Signed-off-by: Alan Coopersmith <[email protected]> Reviewed-by: Rami Ylimäki <[email protected]> Signed-off-by: Keith Packard <[email protected]> (cherry picked from commit cfc4c3d7fa8bd4da4c08b2ab8e6f85435f75353a) diff --git a/os/client.c b/os/client.c index b534977..e297f8c 100644 --- a/os/client.c +++ b/os/client.c @@ -59,6 +59,11 @@ #include "os.h" #include "dixstruct.h" +#ifdef __sun +#include <errno.h> +#include <procfs.h> +#endif + /** * Try to determine a PID for a client from its connection * information. This should be called only once when new client has @@ -117,8 +122,6 @@ void DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs) { char path[PATH_MAX + 1]; int totsize = 0; - int cmdsize = 0; - int argsize = 0; int fd = 0; if (cmdname) @@ -129,6 +132,48 @@ void DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs) if (pid == -1) return; +#ifdef __sun /* Solaris */ + /* Solaris does not support /proc/pid/cmdline, but makes information + * similar to what ps shows available in a binary structure in the + * /proc/pid/psinfo file. */ + if (snprintf(path, sizeof(path), "/proc/%d/psinfo", pid) < 0) + return; + fd = open(path, O_RDONLY); + if (fd < 0) + { + ErrorF ("Failed to open %s: %s\n", path, strerror(errno)); + return; + } + else + { + psinfo_t psinfo = { 0 }; + char *sp; + + totsize = read(fd, &psinfo, sizeof(psinfo_t)); + close(fd); + if (totsize <= 0) + return; + + /* pr_psargs is the first PRARGSZ (80) characters of the command + * line string - assume up to the first space is the command name, + * since it's not delimited. While there is also pr_fname, that's + * more limited, giving only the first 16 chars of the basename of + * the file that was exec'ed, thus cutting off many long gnome + * command names, or returning "isapython2.6" for all python scripts. + */ + psinfo.pr_psargs[PRARGSZ-1] = '\0'; + sp = strchr(psinfo.pr_psargs, ' '); + if (sp) + *sp++ = '\0'; + + if (cmdname) + *cmdname = strdup(psinfo.pr_psargs); + + if (cmdargs && sp) + *cmdargs = strdup(sp); + } +#else /* not Solaris */ + /* Check if /proc/pid/cmdline exists. It's not supported on all * operating systems. */ if (snprintf(path, sizeof(path), "/proc/%d/cmdline", pid) < 0) @@ -146,7 +191,6 @@ void DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs) path[totsize - 1] = '\0'; /* Contruct the process name without arguments. */ - cmdsize = strlen(path) + 1; if (cmdname) { char *name = malloc(cmdsize); @@ -159,10 +203,14 @@ void DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs) } /* Construct the arguments for client process. */ - argsize = totsize - cmdsize; - if (cmdargs && (argsize > 0)) + if (cmdargs) { - char *args = malloc(argsize); + int cmdsize = strlen(path) + 1; + int argsize = totsize - cmdsize; + char *args = NULL; + + if (argsize > 0) + args = malloc(argsize); if (args) { int i = 0; @@ -175,6 +223,7 @@ void DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs) *cmdargs = args; } } +#endif } /** @@ -198,9 +247,9 @@ void ReserveClientIds(struct _Client *client) DetermineClientCmd(client->clientIds->pid, &client->clientIds->cmdname, &client->clientIds->cmdargs); DebugF("client(%lx): Reserved pid(%d).\n", - client->clientAsMask, client->clientIds->pid); + (unsigned long) client->clientAsMask, client->clientIds->pid); DebugF("client(%lx): Reserved cmdname(%s) and cmdargs(%s).\n", - client->clientAsMask, + (unsigned long) client->clientAsMask, client->clientIds->cmdname ? client->clientIds->cmdname : "NULL", client->clientIds->cmdargs ? client->clientIds->cmdargs : "NULL"); #endif /* CLIENTIDS */ @@ -222,9 +271,9 @@ void ReleaseClientIds(struct _Client *client) return; DebugF("client(%lx): Released pid(%d).\n", - client->clientAsMask, client->clientIds->pid); + (unsigned long) client->clientAsMask, client->clientIds->pid); DebugF("client(%lx): Released cmdline(%s) and cmdargs(%s).\n", - client->clientAsMask, + (unsigned long) client->clientAsMask, client->clientIds->cmdname ? client->clientIds->cmdname : "NULL", client->clientIds->cmdargs ? client->clientIds->cmdargs : "NULL"); -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

