<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/input/misc/uinput.c, branch v4.7</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.7</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-05-28T02:14:35Z</updated>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input</title>
<updated>2016-05-28T02:14:35Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-05-28T02:14:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ed2608faa0f701b1dbc65277a9e5c7ff7118bfd4'/>
<id>urn:sha1:ed2608faa0f701b1dbc65277a9e5c7ff7118bfd4</id>
<content type='text'>
Pull more input subsystem updates from Dmitry Torokhov:
 "Just a few more driver fixes; new drivers will be coming in the next
  merge window"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: pwm-beeper - fix - scheduling while atomic
  Input: xpad - xbox one elite controller support
  Input: xpad - add more third-party controllers
  Input: xpad - prevent spurious input from wired Xbox 360 controllers
  Input: xpad - move pending clear to the correct location
  Input: uinput - handle compat ioctl for UI_SET_PHYS
</content>
</entry>
<entry>
<title>Input: uinput - handle compat ioctl for UI_SET_PHYS</title>
<updated>2016-05-20T18:00:43Z</updated>
<author>
<name>Ricky Liang</name>
<email>jcliang@chromium.org</email>
</author>
<published>2016-05-20T17:58:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=affa80bd97f7ca282d1faa91667b3ee9e4c590e6'/>
<id>urn:sha1:affa80bd97f7ca282d1faa91667b3ee9e4c590e6</id>
<content type='text'>
When running a 32-bit userspace on a 64-bit kernel, the UI_SET_PHYS
ioctl needs to be treated with special care, as it has the pointer
size encoded in the command.

Signed-off-by: Ricky Liang &lt;jcliang@chromium.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;</content>
</entry>
<entry>
<title>drivers/input: eliminate INPUT_COMPAT_TEST macro</title>
<updated>2016-03-25T23:37:42Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2016-03-25T21:20:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b8b4ead11e9d258ccc9a8aea28cc0ac747b044ef'/>
<id>urn:sha1:b8b4ead11e9d258ccc9a8aea28cc0ac747b044ef</id>
<content type='text'>
INPUT_COMPAT_TEST became much simpler after commit f4056b52845283
("input: redefine INPUT_COMPAT_TEST as in_compat_syscall()") so we can
cleanly eliminate it altogether.

Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Input: uinput - sanity check on ff_effects_max and EV_FF</title>
<updated>2015-12-19T01:48:52Z</updated>
<author>
<name>Elias Vanderstuyft</name>
<email>elias.vds@gmail.com</email>
</author>
<published>2015-12-19T01:32:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=daf6cd0c1829c48cba197bd87d57fc8bf3f65faa'/>
<id>urn:sha1:daf6cd0c1829c48cba197bd87d57fc8bf3f65faa</id>
<content type='text'>
Currently the user can set ff_effects_max to zero with the EV_FF bit (and
the FF_GAIN and/or FF_AUTOCENTER bits) set, in this case the uninitialized
methods ff-&gt;set_gain and/or ff-&gt;set_autocenter can be dereferenced,
resulting in a kernel oops.

Check in uinput_create_device() and print a helpful message and return
-EINVAL in case the check fails.

Signed-off-by: Elias Vanderstuyft &lt;elias.vds@gmail.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;</content>
</entry>
<entry>
<title>Input: uinput - rework ABS validation</title>
<updated>2015-12-19T01:48:51Z</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@gmail.com</email>
</author>
<published>2015-10-25T09:34:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fbae10db094046dba1d59e1c2ee5140835045f14'/>
<id>urn:sha1:fbae10db094046dba1d59e1c2ee5140835045f14</id>
<content type='text'>
Rework the uinput ABS validation to check passed absinfo data immediately,
but do ABS initialization as last step in UI_DEV_CREATE. The behavior
observed by user-space is not changed, as ABS initialization was never
checked for errors.

With this in place, the order of device initialization and abs
configuration is no longer fixed. Userspace can initialize the device and
afterwards set absinfo just fine.

Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Tested-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;</content>
</entry>
<entry>
<title>Input: uinput - add new UINPUT_DEV_SETUP and UI_ABS_SETUP ioctl</title>
<updated>2015-12-19T01:48:50Z</updated>
<author>
<name>Benjamin Tissoires</name>
<email>benjamin.tissoires@redhat.com</email>
</author>
<published>2015-12-19T01:20:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=052876f8e5aec887d22c4d06e54aa5531ffcec75'/>
<id>urn:sha1:052876f8e5aec887d22c4d06e54aa5531ffcec75</id>
<content type='text'>
This adds two new ioctls, UINPUT_DEV_SETUP and UI_ABS_SETUP, that replaces
the old device setup method (by write()'ing "struct uinput_user_dev" to the
node). The old method is not easily extendable and requires huge payloads.
Furthermore, overloading write() without properly versioned objects is
error-prone.

Therefore, we introduce two new ioctls to replace the old method.  These
ioctls support all features of the old method, plus a "resolution" field
for absinfo. Furthermore, it's properly forward-compatible to new ABS codes
and a growing "struct input_absinfo" structure.

UI_ABS_SETUP also allows user-space to skip unknown axes if not set.  There
is no need to copy the whole array temporarily into the kernel, but instead
the caller issues several ioctl where we copy each value manually.

Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;</content>
</entry>
<entry>
<title>Input: uinput - fix crash when using ABS events</title>
<updated>2015-09-21T16:32:41Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2015-09-19T18:22:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=72d4736253af74147b1fa68145b2f4c61d1f37e1'/>
<id>urn:sha1:72d4736253af74147b1fa68145b2f4c61d1f37e1</id>
<content type='text'>
Commit b6d30968d86c45a7bb599eaca13ff048d3fa576c (Input: uinput - switch to
using for_each_set_bit()) switched driver to use for_each_set_bit().
However during initial write of the uinput structure that contains min/max
data for all possible axes none of them are reflected in dev-&gt;absbit yet
and so we were skipping over all of them and were not allocating absinfo
memory which caused crash later when driver tried to sens EV_ABS events:

&lt;1&gt;[   15.064330] BUG: unable to handle kernel NULL pointer dereference at 0000000000000024
&lt;1&gt;[   15.064336] IP: [&lt;ffffffff8163f142&gt;] input_handle_event+0x232/0x4e0
&lt;4&gt;[   15.064343] PGD 0
&lt;4&gt;[   15.064345] Oops: 0000 [#1] SMP

Fixes: b6d30968d86c45a7bb599eaca13ff048d3fa576c
Cc: stable@vger.kernel.org
Reported-by: Stephen Chandler Paul &lt;cpaul@redhat.com&gt;
Tested-by: Stephen Chandler Paul &lt;cpaul@redhat.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;</content>
</entry>
<entry>
<title>Input: uinput - switch to using for_each_set_bit()</title>
<updated>2015-07-09T18:19:25Z</updated>
<author>
<name>Anshul Garg</name>
<email>aksgarg1989@gmail.com</email>
</author>
<published>2015-07-09T17:18:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b6d30968d86c45a7bb599eaca13ff048d3fa576c'/>
<id>urn:sha1:b6d30968d86c45a7bb599eaca13ff048d3fa576c</id>
<content type='text'>
Use for_each_set_bit to check for set bits in bitmap
as it is more efficient and compact.

Signed-off-by: Anshul Garg &lt;aksgarg1989@gmail.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;</content>
</entry>
<entry>
<title>Input: uinput - add UI_GET_VERSION ioctl</title>
<updated>2014-07-21T21:30:42Z</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@gmail.com</email>
</author>
<published>2014-07-21T00:27:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ba4e9a61ad54c438d4c7b655e94e31f23a6fe13f'/>
<id>urn:sha1:ba4e9a61ad54c438d4c7b655e94e31f23a6fe13f</id>
<content type='text'>
This ioctl is the counterpart to EVIOCGVERSION and returns the
uinput-version the kernel was compiled with.

Reviewed-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: uinput - uinput_validate_absbits() cleanup</title>
<updated>2014-07-21T21:28:21Z</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@gmail.com</email>
</author>
<published>2014-07-21T00:16:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bcb898e5873430d8121eb8df07d5fbfb49134167'/>
<id>urn:sha1:bcb898e5873430d8121eb8df07d5fbfb49134167</id>
<content type='text'>
This moves basic checks and setup from uinput_setup_device() into
uinput_validate_absbits() to make it easier to use. This way, we can call
it from other places without copying the boilerplate code.

Reviewed-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
</feed>
