<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/input/misc/uinput.c, branch v3.14-rc5</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/input/misc/uinput.c?h=v3.14-rc5</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/input/misc/uinput.c?h=v3.14-rc5'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-09-19T15:57:56Z</updated>
<entry>
<title>Input: uinput - support injecting multiple events in one write() call</title>
<updated>2013-09-19T15:57:56Z</updated>
<author>
<name>Ryan Mallon</name>
<email>rmallon@gmail.com</email>
</author>
<published>2013-09-18T19:40:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cbf0541374e2fcfdfdcaf8365c957a137eb9feea'/>
<id>urn:sha1:cbf0541374e2fcfdfdcaf8365c957a137eb9feea</id>
<content type='text'>
Rework the code in uinput_inject_event so that it matches the code in
evdev_write and allows injecting more than one event, or zero events.

Signed-off-by: Ryan Mallon &lt;rmallon@gmail.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-next' of git://github.com/rydberg/linux into next</title>
<updated>2012-10-01T21:40:51Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2012-10-01T21:40:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7774036808011ceecc88cef01dfafcce39ed9fc5'/>
<id>urn:sha1:7774036808011ceecc88cef01dfafcce39ed9fc5</id>
<content type='text'>
Merge Henrik's updates to multitouch code. Even though Jiri already
pulled them in I need to do it too since my changes to evdev using
dynamic major would clash with them.
</content>
</entry>
<entry>
<title>Input: MT - Add flags to input_mt_init_slots()</title>
<updated>2012-09-19T17:50:18Z</updated>
<author>
<name>Henrik Rydberg</name>
<email>rydberg@euromail.se</email>
</author>
<published>2012-08-11T20:07:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b4adbbefc2099476a4f1020041c99f52cf3cd67d'/>
<id>urn:sha1:b4adbbefc2099476a4f1020041c99f52cf3cd67d</id>
<content type='text'>
Preparing to move more repeated code into the mt core, add a flags
argument to the input_mt_slots_init() function.

Reviewed-and-tested-by: Benjamin Tissoires &lt;benjamin.tissoires@enac.fr&gt;
Tested-by: Ping Cheng &lt;pingc@wacom.com&gt;
Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Henrik Rydberg &lt;rydberg@euromail.se&gt;
</content>
</entry>
<entry>
<title>Input: uinput - fix formatting</title>
<updated>2012-08-22T05:29:55Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2012-07-30T05:48:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=54ce165ebd9d9494b64149e0d1ab4ddbf5ea908b'/>
<id>urn:sha1:54ce165ebd9d9494b64149e0d1ab4ddbf5ea908b</id>
<content type='text'>
Reformat the code to keep it within 80 columns.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
</entry>
<entry>
<title>Input: uinput - specify exact bit sizes on userspace APIs</title>
<updated>2012-08-22T05:29:54Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2012-07-30T05:48:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c5b3533a82ef4b6ceae81b7675f8d6dadcc6f3ab'/>
<id>urn:sha1:c5b3533a82ef4b6ceae81b7675f8d6dadcc6f3ab</id>
<content type='text'>
Switch to using __u32/__s32 instead of ordinary 'int' in structures
forming userspace API.

Also internally make request_id unsigned int.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
</entry>
<entry>
<title>Input: uinput - mark failed submission requests as free</title>
<updated>2012-08-22T05:29:54Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2012-07-30T05:48:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=00ce756ce53acdb82d408346e6a7b734ca9e5bad'/>
<id>urn:sha1:00ce756ce53acdb82d408346e6a7b734ca9e5bad</id>
<content type='text'>
If uinput_request_submit() fails after new request ID was allocated
we need to mark that request ID as free, otherwise it will always
stay occupied and we may run out of available IDs.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
</entry>
<entry>
<title>Input: uinput - fix race that can block nonblocking read</title>
<updated>2012-08-22T05:29:53Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2012-07-30T05:48:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=22ae19c6e3c22b390952e90f452f26adad9b8687'/>
<id>urn:sha1:22ae19c6e3c22b390952e90f452f26adad9b8687</id>
<content type='text'>
Consider two threads calling read() on the same uinput-fd, both
non-blocking. Assume there is data-available so both will simultaneously
pass:
	udev-&gt;head == udev-&gt;tail

Then the first thread goes to sleep and the second one pops the message
from the queue. Now assume udev-&gt;head == udev-&gt;tail. If the first thread
wakes up it will call wait_event_*() and sleep in the waitq. This
effectively turns the non-blocking FD into a blocking one.

We fix this by attempting to fetch events from the queue first and only
if we fail to retrieve any events we either return -EAGAIN (in case of
non-blocing read) or wait until there are more events.

This also fixes incorrect return code (we were returning 0 instead of
 -EAGAIN for non-blocking reads) when an event is "stolen" by another
thread. Blocking reads will now continue to wait instead of returning 0
in this scenario.

Count of 0 continues to be a special case, as per spec: we will check for
device existence and whether there are events in the queue, but no events
will be actually retrieved.

Reported-by: David Herrmann &lt;dh.herrmann@googlemail.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
</entry>
<entry>
<title>Input: uinput - return -EINVAL when read buffer size is too small</title>
<updated>2012-08-22T05:29:53Z</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@googlemail.com</email>
</author>
<published>2012-07-30T05:48:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f40033acc2d14acecd1b27a79dc8a0ad437e619a'/>
<id>urn:sha1:f40033acc2d14acecd1b27a79dc8a0ad437e619a</id>
<content type='text'>
Let's check whether the user-supplied buffer is actually big enough and
return -EINVAL if it is not. This differs from current behavior, which
caused 0 to be returned and actually does not make any sense, as
broken application will simply repeat the read getting into endless
loop.

Note that we treat 0 as a special case, according to the standard:

"Before any action described below is taken, and if nbyte is zero,
the read() function may detect and return errors as described below.
In the absence of errors, or if error detection is not performed,
the read() function shall return zero and have no other results."

Signed-off-by: David Herrmann &lt;dh.herrmann@googlemail.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
</entry>
<entry>
<title>Input: uinput - take event lock when fetching events from buffer</title>
<updated>2012-08-22T05:29:52Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2012-07-30T05:48:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=929d1af5478dec82903e05aa9662a4ec12ad655b'/>
<id>urn:sha1:929d1af5478dec82903e05aa9662a4ec12ad655b</id>
<content type='text'>
When fetching events form device's buffer in uinput_read() we need to
take input device's event_lock to avoid racing with new event delivery.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
</entry>
<entry>
<title>Input: uinput - allow for 0/0 min/max on absolute axes.</title>
<updated>2011-03-31T07:02:39Z</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2011-03-31T05:25:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a718d79cc0e0c2f0aa82ba2c54383a18f15b7738'/>
<id>urn:sha1:a718d79cc0e0c2f0aa82ba2c54383a18f15b7738</id>
<content type='text'>
Some devices provide absolute axes with min/max of 0/0 (e.g. wacom's
ABS_MISC axis). Current uinput restrictions do not allow duplication of
these devices and require hacks in userspace to work around this.

If the kernel accepts physical devices with a min/max of 0/0, uinput
shouldn't disallow the same range.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
</entry>
</feed>
