xserver: Branch 'master' - 4 commits

Keith Packard keithp at kemper.freedesktop.org
Thu Feb 20 20:48:47 PST 2014


 Xi/exevents.c                    |    3 ++-
 Xi/xipassivegrab.c               |    4 ++++
 config/Makefile.am               |    2 +-
 config/non-seat0.conf.multi-seat |   18 ------------------
 test/Makefile.am                 |    2 +-
 test/input.c                     |    4 ++--
 6 files changed, 10 insertions(+), 23 deletions(-)

New commits:
commit 0f10cfd4b903d4db293ec47c8a9a0d8b33965803
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Feb 20 13:18:05 2014 +1000

    Xi: check for invalid modifiers for XI2 passive grabs
    
    The other values are checked correctly, but if a modifier was outside the
    allowed range, it would go unnoticed and cause a out-of-bounds read error for
    any mask equal or larger than 256. The DetailRec where we store the grab masks
    is only sized to 8 * sizeof(Mask).
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 4ed58ee..e9f670e 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -2183,7 +2183,8 @@ CheckGrabValues(ClientPtr client, GrabParameters *param)
         return BadValue;
     }
 
-    if (param->grabtype != XI2 && (param->modifiers != AnyModifier) &&
+    if (param->modifiers != AnyModifier &&
+        param->modifiers != XIAnyModifier &&
         (param->modifiers & ~AllModifiersMask)) {
         client->errorValue = param->modifiers;
         return BadValue;
diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index 8aba977..700622d 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -189,6 +189,10 @@ ProcXIPassiveGrabDevice(ClientPtr client)
         uint8_t status = Success;
 
         param.modifiers = *modifiers;
+        ret = CheckGrabValues(client, &param);
+        if (ret != Success)
+            goto out;
+
         switch (stuff->grab_type) {
         case XIGrabtypeButton:
             status = GrabButton(client, dev, mod_dev, stuff->detail,
commit ec6a44612565e0716bd5b2e2b80a8d381691feb6
Author: Gaetan Nadon <memsize at videotron.ca>
Date:   Wed Feb 19 13:48:06 2014 -0500

    test: remove source file from hashtabletest LDADD
    
    LDADD is for libraries and not for source code.
    
    Introduced in commit: 	ccb3e78124fb05defd0c9b438746b79d84dfc3ae
    
    Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/test/Makefile.am b/test/Makefile.am
index 2852bb3..f8aa659 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -36,7 +36,7 @@ fixes_LDADD=$(TEST_LDADD)
 xfree86_LDADD=$(TEST_LDADD)
 touch_LDADD=$(TEST_LDADD)
 signal_logging_LDADD=$(TEST_LDADD)
-hashtabletest_LDADD=$(TEST_LDADD) $(top_srcdir)/Xext/hashtable.c
+hashtabletest_LDADD=$(TEST_LDADD)
 os_LDADD=$(TEST_LDADD)
 
 libxservertest_la_LIBADD = $(XSERVER_LIBS)
commit 31b0be69e5eea3d1c82d6610bd37bbdb4dca779c
Author: Thierry Reding <treding at nvidia.com>
Date:   Wed Feb 19 17:16:48 2014 +0100

    test/input: Fix alignment assertion for doubles
    
    The code previously tried to compute the offset of a field in the
    valuator by subtracting the address of the valuator from the _value_ of
    the field (rather than the field's address). The correct way to do it
    would have been (note the &'s):
    
    	assert(((void *) &v->axisVal - (void *) v) % sizeof(double) == 0);
    	assert(((void *) &v->axes - (void *) v) % sizeof(double) == 0);
    
    That's essentially what the offsetof() macro does. Using offsetof() has
    the added benefit of not using void pointer arithmetic and therefore
    silencing a warning on some compilers.
    
    Signed-off-by: Thierry Reding <treding at nvidia.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/test/input.c b/test/input.c
index 5813e6d..9b5db89 100644
--- a/test/input.c
+++ b/test/input.c
@@ -1390,8 +1390,8 @@ dix_valuator_alloc(void)
         assert(v->numAxes == num_axes);
 #if !defined(__i386__) && !defined(__m68k__) && !defined(__sh__)
         /* must be double-aligned on 64 bit */
-        assert(((void *) v->axisVal - (void *) v) % sizeof(double) == 0);
-        assert(((void *) v->axes - (void *) v) % sizeof(double) == 0);
+        assert(offsetof(struct _ValuatorClassRec, axisVal) % sizeof(double) == 0);
+        assert(offsetof(struct _ValuatorClassRec, axes) % sizeof(double) == 0);
 #endif
         num_axes++;
     }
commit 9368bdec1d37127e97411b684f0b1fce5ee97907
Author: Laércio de Sousa <lbsousajr at gmail.com>
Date:   Mon Feb 17 08:43:49 2014 +1000

    Get rid of config/non-seat0.conf.multi-seat
    
    This file is deprecated by commits c73c36b53 and 46cf2a6093.
    
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/config/Makefile.am b/config/Makefile.am
index c6350be..0e20e8b 100644
--- a/config/Makefile.am
+++ b/config/Makefile.am
@@ -38,4 +38,4 @@ endif # !CONFIG_HAL
 
 endif # !CONFIG_UDEV
 
-EXTRA_DIST = x11-input.fdi 10-evdev.conf non-seat0.conf.multi-seat fdi2iclass.py 10-quirks.conf
+EXTRA_DIST = x11-input.fdi 10-evdev.conf fdi2iclass.py 10-quirks.conf
diff --git a/config/non-seat0.conf.multi-seat b/config/non-seat0.conf.multi-seat
deleted file mode 100644
index 34008ce..0000000
--- a/config/non-seat0.conf.multi-seat
+++ /dev/null
@@ -1,18 +0,0 @@
-# This is the default configuration for servers on seat-1 and above.
-#
-# Start the server with -config non-seat0.conf.multi-seat, or alternatively
-# rename the file to end in .conf and put it in the standard config
-# directory (though it will apply to _all_ seats!).
-#
-# * Disable VT switching with Ctrl-Alt-F1
-# * Force a grab on all input devices to detach them from the VT subsystem
-#   to avoid event leakage.
-
-Section "ServerFlags"
-        Option "DontVTSwitch" "on"
-EndSection
-
-Section "InputClass"
-        Identifier "Force input devices to seat"
-        Option "GrabDevice" "on"
-EndSection


More information about the xorg-commit mailing list