lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 20 Nov 2013 16:32:21 -0500
From:	Benjamin Tissoires <benjamin.tissoires@...hat.com>
To:	Benjamin Tissoires <benjamin.tissoires@...il.com>,
	Jiri Kosina <jkosina@...e.cz>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	David Herrmann <dh.herrmann@...il.com>,
	Henrik Rydberg <rydberg@...omail.se>,
	Antonio Ospite <ospite@...denti.unina.it>, simon@...gewell.org,
	case@...psmoderne.net, linux-input@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 3/3] input: reintroduce filtering of mt axis when the device is not multitouch

Some devices (like the PS3 Sixaxis) have a lot of absolute axis which
are mapped by hid-input on ABS_MISC and beyond. These axis interfere
with the multitouch protocol.
The kernel considers those device to be following the multitouch protocol
A, and removes the filtering of such events.

We can rely on INPUT_PROP_MT to know if the device is multitouch or not,
and then rely on mt to know if the device uses the protocol B.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@...hat.com>
---
 Documentation/input/multi-touch-protocol.txt | 3 ++-
 drivers/input/input.c                        | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt
index 420444f..b476845 100644
--- a/Documentation/input/multi-touch-protocol.txt
+++ b/Documentation/input/multi-touch-protocol.txt
@@ -55,7 +55,8 @@ surface. The order in which the packets appear in the event stream is not
 important.  Event filtering and finger tracking is left to user space [3].
 
 Note that type A device are requested to manually set the property
-INPUT_PROP_MT.
+INPUT_PROP_MT. If this property is not set, the absolute multitouch axis
+will be statefull, so this step is now mandatory.
 Type B devices does not need to set INPUT_PROP_MT manually, as this is done
 by calling input_mt_init_slot().
 
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 1198785..239639e 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -224,7 +224,8 @@ static int input_handle_abs_event(struct input_dev *dev,
 		return INPUT_IGNORE_EVENT;
 	}
 
-	is_mt_event = input_is_mt_value(code);
+	is_mt_event = test_bit(INPUT_PROP_MT, dev->propbit) &&
+			input_is_mt_value(code);
 
 	if (!is_mt_event) {
 		pold = &dev->absinfo[code].value;
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ