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:	Sat, 22 May 2010 11:11:25 +0200
From:	Henrik Rydberg <rydberg@...omail.se>
To:	Ping Cheng <pinglinux@...il.com>
CC:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	Mika Kuoppala <mika.kuoppala@...ia.com>,
	Peter Hutterer <peter.hutterer@...-t.net>,
	Benjamin Tissoires <tissoire@...a.fr>,
	Stephane Chatty <chatty@...c.fr>,
	Rafi Rubin <rafi@...s.upenn.edu>,
	Michael Poole <mdpoole@...ilus.org>
Subject: Re: [PATCH 2/2] input: mt: Document the MT event slot protocol (rev3)

Ok, I will make another leap here, in an attempt to find a workable compromise
for the MT slots.

The issue at hand seems to be a general reluctance to move MT-related stuff
outside of the ABS_MT namespace. My objection relates to the identification of
events handled on a per-slot basis in user space. So let us treat these as
separate issues.

1. Use the name ABS_MT_SLOT

2. Move the list of slot events to input.h, like this:

diff --git a/drivers/input/input.c b/drivers/input/input.c
@@ -33,21 +33,8 @@ MODULE_LICENSE("GPL");

 #define INPUT_DEVICES	256

-/*
- * EV_ABS events which should be filtered on a per-slot basis are listed here.
- */
 static unsigned int input_mt_abs_map_init_data[] __initdata = {
-	ABS_MT_TOUCH_MAJOR,
-	ABS_MT_TOUCH_MINOR,
-	ABS_MT_WIDTH_MAJOR,
-	ABS_MT_WIDTH_MINOR,
-	ABS_MT_ORIENTATION,
-	ABS_MT_POSITION_X,
-	ABS_MT_POSITION_Y,
-	ABS_MT_TOOL_TYPE,
-	ABS_MT_BLOB_ID,
-	ABS_MT_TRACKING_ID,
-	ABS_MT_PRESSURE,
+	MT_SLOT_ABS_EVENTS
 };
 static unsigned char input_mt_abs_map[ABS_CNT];

diff --git a/include/linux/input.h b/include/linux/input.h
@@ -815,6 +815,23 @@ struct input_absinfo {
 #define MT_TOOL_PEN		1

 /*
+ * MT slot event lists
+ */
+
+#define MT_SLOT_ABS_EVENTS		\
+	ABS_MT_TOUCH_MAJOR,		\
+	ABS_MT_TOUCH_MINOR,		\
+	ABS_MT_WIDTH_MAJOR,		\
+	ABS_MT_WIDTH_MINOR,		\
+	ABS_MT_ORIENTATION,		\
+	ABS_MT_POSITION_X,		\
+	ABS_MT_POSITION_Y,		\
+	ABS_MT_TOOL_TYPE,		\
+	ABS_MT_BLOB_ID,			\
+	ABS_MT_TRACKING_ID,		\
+	ABS_MT_PRESSURE,		\
+
+/*
  * Values describing the status of a force-feedback effect
  */
 #define FF_STATUS_STOPPED	0x00


In my mind, this resolves the outstanding issues, including providing a way for
userspace to enumerate the MT events. Comments are highly appreciated.

Henrik

--
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