<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/input/evdev.c, branch v6.12.80</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>[tree-wide] finally take no_llseek out</title>
<updated>2024-09-27T15:18:43+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2024-09-27T01:56:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=cb787f4ac0c2e439ea8d7e6387b925f74576bdf8'/>
<id>cb787f4ac0c2e439ea8d7e6387b925f74576bdf8</id>
<content type='text'>
no_llseek had been defined to NULL two years ago, in commit 868941b14441
("fs: remove no_llseek")

To quote that commit,

  At -rc1 we'll need do a mechanical removal of no_llseek -

  git grep -l -w no_llseek | grep -v porting.rst | while read i; do
	sed -i '/\&lt;no_llseek\&gt;/d' $i
  done

  would do it.

Unfortunately, that hadn't been done.  Linus, could you do that now, so
that we could finally put that thing to rest? All instances are of the
form
	.llseek = no_llseek,
so it's obviously safe.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
no_llseek had been defined to NULL two years ago, in commit 868941b14441
("fs: remove no_llseek")

To quote that commit,

  At -rc1 we'll need do a mechanical removal of no_llseek -

  git grep -l -w no_llseek | grep -v porting.rst | while read i; do
	sed -i '/\&lt;no_llseek\&gt;/d' $i
  done

  would do it.

Unfortunately, that hadn't been done.  Linus, could you do that now, so
that we could finally put that thing to rest? All instances are of the
form
	.llseek = no_llseek,
so it's obviously safe.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Input: evdev - limit amount of data for writes</title>
<updated>2024-08-24T06:51:14+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2024-08-15T18:41:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=6994d8b84bfd71431bfccb5baf84a827086d48a5'/>
<id>6994d8b84bfd71431bfccb5baf84a827086d48a5</id>
<content type='text'>
Limit amount of data that can be written into an evdev instance at
a given time to 4096 bytes (170 input events) to avoid holding
evdev-&gt;mutex for too long and starving other users.

Reviewed-by: Jeff LaBundy &lt;jeff@labundy.com&gt;
Reviewed-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Link: https://lore.kernel.org/r/Zr5L8TUzkJcB9HcF@google.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Limit amount of data that can be written into an evdev instance at
a given time to 4096 bytes (170 input events) to avoid holding
evdev-&gt;mutex for too long and starving other users.

Reviewed-by: Jeff LaBundy &lt;jeff@labundy.com&gt;
Reviewed-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Link: https://lore.kernel.org/r/Zr5L8TUzkJcB9HcF@google.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Input: make events() method return number of events processed</title>
<updated>2024-07-08T23:22:49+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2024-07-03T21:37:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=14498e993fb77adce75f0106162902b2f8b1d480'/>
<id>14498e993fb77adce75f0106162902b2f8b1d480</id>
<content type='text'>
In preparation to consolidating filtering and event processing in the
input core change events() method to return number of events processed
by it.

Reviewed-by: Jeff LaBundy &lt;jeff@labundy.com&gt;
Reviewed-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
Link: https://lore.kernel.org/r/20240703213756.3375978-4-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In preparation to consolidating filtering and event processing in the
input core change events() method to return number of events processed
by it.

Reviewed-by: Jeff LaBundy &lt;jeff@labundy.com&gt;
Reviewed-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
Link: https://lore.kernel.org/r/20240703213756.3375978-4-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Input: evdev - remove -&gt;event() method</title>
<updated>2024-07-08T23:22:48+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2024-07-03T21:37:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=b3d65108ac8abd79e0367d77598d539b117044a3'/>
<id>b3d65108ac8abd79e0367d77598d539b117044a3</id>
<content type='text'>
Input core favors -&gt;events() (batch) method over -&gt;event() method
if the former is defined, so there is no point in defining evdev_event()
as it is never called. Remove it.

Reviewed-by: Jeff LaBundy &lt;jeff@labundy.com&gt;
Reviewed-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
Link: https://lore.kernel.org/r/20240703213756.3375978-2-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Input core favors -&gt;events() (batch) method over -&gt;event() method
if the former is defined, so there is no point in defining evdev_event()
as it is never called. Remove it.

Reviewed-by: Jeff LaBundy &lt;jeff@labundy.com&gt;
Reviewed-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
Link: https://lore.kernel.org/r/20240703213756.3375978-2-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Input: evdev - annotate struct evdev_client with __counted_by</title>
<updated>2023-09-30T16:24:16+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2023-09-30T16:17:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=8927e688e9e0ae625af6a917bace8cc9cac55677'/>
<id>8927e688e9e0ae625af6a917bace8cc9cac55677</id>
<content type='text'>
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct evdev_client.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Link: https://lore.kernel.org/r/20230922175027.work.563-kees@kernel.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct evdev_client.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Link: https://lore.kernel.org/r/20230922175027.work.563-kees@kernel.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Input: evdev - per-client waitgroups</title>
<updated>2020-10-07T01:34:15+00:00</updated>
<author>
<name>Kenny Levinsen</name>
<email>kl@kl.wtf</email>
</author>
<published>2020-10-05T18:15:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=4ba8b8aec58bf8de3ca29ea08d7eb11a127e7b90'/>
<id>4ba8b8aec58bf8de3ca29ea08d7eb11a127e7b90</id>
<content type='text'>
All evdev clients share a common waitgroup. On new input events, all
clients waiting on this waitgroup are woken up, even those filtering out
the events, possibly more than once per event. This leads to duplicated
and unwanted wakeups.

Split the shared waitgroup into per-client waitgroups for more
fine-grained wakeups.

Signed-off-by: Kenny Levinsen &lt;kl@kl.wtf&gt;
Link: https://lore.kernel.org/r/20200429184126.2155-1-kl@kl.wtf
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All evdev clients share a common waitgroup. On new input events, all
clients waiting on this waitgroup are woken up, even those filtering out
the events, possibly more than once per event. This leads to duplicated
and unwanted wakeups.

Split the shared waitgroup into per-client waitgroups for more
fine-grained wakeups.

Signed-off-by: Kenny Levinsen &lt;kl@kl.wtf&gt;
Link: https://lore.kernel.org/r/20200429184126.2155-1-kl@kl.wtf
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' into next</title>
<updated>2020-05-18T04:10:28+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2020-05-18T04:10:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=2969869bfac3cb8c549f6cadea6b97bb1d9ec86f'/>
<id>2969869bfac3cb8c549f6cadea6b97bb1d9ec86f</id>
<content type='text'>
Merge for-linus branch to sync Elan touchscreen driver code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Merge for-linus branch to sync Elan touchscreen driver code.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'v5.6' into next</title>
<updated>2020-05-12T19:18:21+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2020-05-12T19:18:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=0fdc50dfab47d525b71a9f0d8310746cdc0c09c5'/>
<id>0fdc50dfab47d525b71a9f0d8310746cdc0c09c5</id>
<content type='text'>
Sync up with mainline to get device tree and other changes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sync up with mainline to get device tree and other changes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Input: evdev - call input_flush_device() on release(), not flush()</title>
<updated>2020-04-22T21:15:04+00:00</updated>
<author>
<name>Brendan Shanks</name>
<email>bshanks@codeweavers.com</email>
</author>
<published>2020-04-22T20:45:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=09264098ff153f60866039d60b31d39b66f55a31'/>
<id>09264098ff153f60866039d60b31d39b66f55a31</id>
<content type='text'>
input_flush_device() should only be called once the struct file is being
released and no open descriptors remain, but evdev_flush() was calling
it whenever a file descriptor was closed.

This caused uploaded force-feedback effects to be erased when a process
did a dup()/close() on the event FD, called system(), etc.

Call input_flush_device() from evdev_release() instead.

Reported-by: Mathieu Maret &lt;mathieu.maret@gmail.com&gt;
Signed-off-by: Brendan Shanks &lt;bshanks@codeweavers.com&gt;
Link: https://lore.kernel.org/r/20200421231003.7935-1-bshanks@codeweavers.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
input_flush_device() should only be called once the struct file is being
released and no open descriptors remain, but evdev_flush() was calling
it whenever a file descriptor was closed.

This caused uploaded force-feedback effects to be erased when a process
did a dup()/close() on the event FD, called system(), etc.

Call input_flush_device() from evdev_release() instead.

Reported-by: Mathieu Maret &lt;mathieu.maret@gmail.com&gt;
Signed-off-by: Brendan Shanks &lt;bshanks@codeweavers.com&gt;
Link: https://lore.kernel.org/r/20200421231003.7935-1-bshanks@codeweavers.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Input: evdev - use keyed wakeups</title>
<updated>2020-04-19T04:57:07+00:00</updated>
<author>
<name>Kenny Levinsen</name>
<email>kl@kl.wtf</email>
</author>
<published>2020-04-19T04:26:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=81b4d1d22ca0d0162360d3536b0eb3f6d5bfcf88'/>
<id>81b4d1d22ca0d0162360d3536b0eb3f6d5bfcf88</id>
<content type='text'>
Some processes, such as systemd, are only polling for EPOLLERR|EPOLLHUP.
As evdev uses unkeyed wakeups, such a poll receives many spurious
wakeups from uninteresting events.

Use keyed wakeups to allow the wakeup target to more efficiently discard
these uninteresting events.

Signed-off-by: Kenny Levinsen &lt;kl@kl.wtf&gt;
Link: https://lore.kernel.org/r/20200410233557.3892-1-kl@kl.wtf
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some processes, such as systemd, are only polling for EPOLLERR|EPOLLHUP.
As evdev uses unkeyed wakeups, such a poll receives many spurious
wakeups from uninteresting events.

Use keyed wakeups to allow the wakeup target to more efficiently discard
these uninteresting events.

Signed-off-by: Kenny Levinsen &lt;kl@kl.wtf&gt;
Link: https://lore.kernel.org/r/20200410233557.3892-1-kl@kl.wtf
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
