<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/hid/hid_bpf.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-11-25T17:21:47Z</updated>
<entry>
<title>Revert "HID: bpf: allow write access to quirks field in struct hid_device"</title>
<updated>2024-11-25T17:21:47Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-11-25T17:21:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=919464deeca24e5bf13b6c8efd0b1d25cc43866f'/>
<id>urn:sha1:919464deeca24e5bf13b6c8efd0b1d25cc43866f</id>
<content type='text'>
This reverts commit 6fd47effe92b, and the related self-test update
commit e14e0eaeb040 ("selftests/hid: add test for assigning a given
device to hid-generic").

It results in things like the scroll wheel on Logitech mice not working
after a reboot due to the kernel being confused about the state of the
high-resolution mode.

Quoting Benjamin Tissoires:
 "The idea of 6fd47effe92b was to be able to call hid_bpf_rdesc_fixup()
  once per reprobe of the device.

  However, because the bpf filter can now change the quirk value, the
  call had to be moved before the driver gets bound (which was
  previously ensuring the unicity of the call).

  The net effect is that now, in the case hid-generic gets loaded first
  and then the specific driver gets loaded once the disk is available,
  the value of -&gt;quirks is not reset, but kept to the value that was set
  by hid-generic (HID_QUIRK_INPUT_PER_APP).

  Once hid-logitech-hidpp kicks in, that quirk is now set, which creates
  two inputs for the single mouse: one keyboard for fancy shortcuts, and
  one mouse node.

  However, hid-logitech-hidpp expects only one input node to be attached
  (it stores it into hidpp-&gt;input), and when a wheel event is received,
  because there is some processing with high-resolution wheel events,
  the wheel event is injected into hidpp-&gt;input.

  And of course, when HID_QUIRK_INPUT_PER_APP is set, hidpp-&gt;input gets
  the keyboard node, which doesn't have wheel event type, and the events
  are ignored"

Reported-and-bisected-by: Mike Galbraith &lt;efault@gmx.de&gt;
Link: https://lore.kernel.org/all/CAHk-=wiUkQM3uheit2cNM0Y0OOY5qqspJgC8LkmOkJ2p2LDxcw@mail.gmail.com/
Acked-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/hid: add test for assigning a given device to hid-generic</title>
<updated>2024-10-04T14:10:49Z</updated>
<author>
<name>Benjamin Tissoires</name>
<email>bentiss@kernel.org</email>
</author>
<published>2024-10-01T14:30:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e14e0eaeb040899f7cb363cdfdf8fbee84a45f08'/>
<id>urn:sha1:e14e0eaeb040899f7cb363cdfdf8fbee84a45f08</id>
<content type='text'>
We use a well known VID/PID on a driver that doesn't need to talk to
the device, ensures we created the device against the target driver,
then load our program and ensure we have unbound to this driver and use
hid-generic instead.

Reviewed-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Acked-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Link: https://patch.msgid.link/20241001-hid-bpf-hid-generic-v3-9-2ef1019468df@kernel.org
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/hid: allow to parametrize bus/vid/pid/rdesc on the test device</title>
<updated>2024-10-04T14:10:46Z</updated>
<author>
<name>Benjamin Tissoires</name>
<email>bentiss@kernel.org</email>
</author>
<published>2024-10-01T14:30:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=72c55473fc8c82b06df79473f04c5231d51580d7'/>
<id>urn:sha1:72c55473fc8c82b06df79473f04c5231d51580d7</id>
<content type='text'>
This will be useful to introduce variants in tests to test the
interactions between HID-BPF and some kernel modules.

Reviewed-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Acked-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Link: https://patch.msgid.link/20241001-hid-bpf-hid-generic-v3-7-2ef1019468df@kernel.org
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/hid: cleanup C tests by adding a common struct uhid_device</title>
<updated>2024-10-04T14:10:46Z</updated>
<author>
<name>Benjamin Tissoires</name>
<email>bentiss@kernel.org</email>
</author>
<published>2024-10-01T14:30:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4fb41dfde0699796b955eb94e7b8037a67b4b3a5'/>
<id>urn:sha1:4fb41dfde0699796b955eb94e7b8037a67b4b3a5</id>
<content type='text'>
Allows to have an abstract class uhid_device which handles all of the
uhid part without having to mess up with individual fds.

struct attach_prog_args is now never used in hid_bpf.c, so drop it as well

Acked-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Link: https://patch.msgid.link/20241001-hid-bpf-hid-generic-v3-6-2ef1019468df@kernel.org
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'hid-for-linus-2024091602' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid</title>
<updated>2024-09-19T07:42:21Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-09-19T07:42:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a65b3c3ed49a3b8068c002e98c90f8594927ff25'/>
<id>urn:sha1:a65b3c3ed49a3b8068c002e98c90f8594927ff25</id>
<content type='text'>
Pull HID updates from Jiri Kosina:

 - New HID over SPI driver for Goodix devices that don't follow
   Microsoft's HID-over-SPI specification, so a separate driver is
   needed. Currently supported device is GT7986U touchscreen (Charles
   Wang)

 - support for new hardware features in Wacom driver (high-res wheel
   scrolling, touchstrings with relative motions, support for two
   touchrings) (Jason Gerecke)

 - support for customized vendor firmware loading in intel-ish driver
   (Zhang Lixu)

 - fix for theoretical race condition in i2c-hid (Dmitry Torokhov)

 - support for HIDIOCREVOKE -- evdev's EVIOCREVOKE equivalent in hidraw
   (Peter Hutterer)

 - initial hidraw selftest implementation (Benjamin Tissoires)

 - constification of device-specific report descriptors (Thomas
   Weißschuh)

 - other small assorted fixes and device ID / quirk additions

* tag 'hid-for-linus-2024091602' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (54 commits)
  hid: cp2112: Use irq_get_trigger_type() helper
  HID: i2c-hid: ensure various commands do not interfere with each other
  HID: multitouch: Add support for Thinkpad X12 Gen 2 Kbd Portfolio
  HID: wacom: Do not warn about dropped packets for first packet
  HID: wacom: Support sequence numbers smaller than 16-bit
  HID: lg: constify fixed up report descriptor
  HID: uclogic: constify fixed up report descriptor
  HID: waltop: constify fixed up report descriptor
  HID: sony: constify fixed up report descriptor
  HID: pxrc: constify fixed up report descriptor
  HID: steelseries: constify fixed up report descriptor
  HID: viewsonic: constify fixed up report descriptor
  HID: vrc2: constify fixed up report descriptor
  HID: xiaomi: constify fixed up report descriptor
  HID: maltron: constify fixed up report descriptor
  HID: keytouch: constify fixed up report descriptor
  HID: holtek-kbd: constify fixed up report descriptor
  HID: dr: constify fixed up report descriptor
  HID: bigbenff: constify fixed up report descriptor
  HID: picoLCD: Use backlight power constants
  ...
</content>
</entry>
<entry>
<title>Merge tag 'linux_kselftest-next-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest</title>
<updated>2024-09-17T14:49:56Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-09-17T14:49:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=32b72debef5ab9b8bec32fcf3c5d4a62da8a4db2'/>
<id>urn:sha1:32b72debef5ab9b8bec32fcf3c5d4a62da8a4db2</id>
<content type='text'>
Pull kselftest update from Shuah Khan:

 - test coverage for dup_fd() failure handling in unshare_fd()

 - new selftest for the acct() syscall

 - basic uprobe testcase

 - several small fixes and cleanups to existing tests

 - user and strscpy removal as they became kunit tests

 - fixes to build failures and warnings

* tag 'linux_kselftest-next-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (21 commits)
  selftests: kselftest: Use strerror() on nolibc
  selftests/timers: Remove unused NSEC_PER_SEC macro
  selftests:resctrl: Fix build failure on archs without __cpuid_count()
  selftests/ftrace: Fix eventfs ownership testcase to find mount point
  selftests: filesystems: fix warn_unused_result build warnings
  selftests:core: test coverage for dup_fd() failure handling in unshare_fd()
  selftests/ftrace: Fix test to handle both old and new kernels
  kselftest: timers: Fix const correctness
  selftests/ftrace: Add required dependency for kprobe tests
  selftests: rust: config: disable GCC_PLUGINS
  selftests: rust: config: add trailing newline
  tracing/selftests: Run the ownership test twice
  selftests/uprobes: Add a basic uprobe testcase
  selftests: harness: rename __constructor_order for clarification
  selftests: harness: remove unneeded __constructor_order_last()
  selftest: acct: Add selftest for the acct() syscall
  selftests: lib: remove strscpy test
  selftests: user: remove user suite
  kselftest: cpufreq: Add RTC wakeup alarm
  selftests/exec: Fix grammar in an error message.
  ...
</content>
</entry>
<entry>
<title>selftests/hid: extract the utility part of hid_bpf.c into its own header</title>
<updated>2024-08-29T08:39:37Z</updated>
<author>
<name>Benjamin Tissoires</name>
<email>bentiss@kernel.org</email>
</author>
<published>2024-08-27T08:19:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=375e9bde9fc0fdb9e8d2339b06be5c2c2a5cb701'/>
<id>urn:sha1:375e9bde9fc0fdb9e8d2339b06be5c2c2a5cb701</id>
<content type='text'>
When adding new tests programs, we need the same mechanics to create
new virtual devices, and read from their matching hidraw node.

Extract the common part into its own header so we can easily add new
tests C-files.

Link: https://patch.msgid.link/20240827-hidraw-revoke-v5-2-d004a7451aea@kernel.org
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: harness: remove unneeded __constructor_order_last()</title>
<updated>2024-08-06T19:40:20Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-07-27T14:37:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2a6b6c9a226279b4f6668450ddb21ae655558087'/>
<id>urn:sha1:2a6b6c9a226279b4f6668450ddb21ae655558087</id>
<content type='text'>
__constructor_order_last() is unneeded.

If __constructor_order_last() is not called on backward-order systems,
__constructor_order will remain 0 instead of being set to
_CONSTRUCTOR_ORDER_BACKWARD (= -1).

__LIST_APPEND() will still take the 'else' branch, so there is no
difference in the behavior.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/hid: add test for attaching multiple time the same struct_ops</title>
<updated>2024-07-24T16:27:22Z</updated>
<author>
<name>Benjamin Tissoires</name>
<email>bentiss@kernel.org</email>
</author>
<published>2024-07-23T16:21:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=facdbdfe0e6202d74758387ae9189c39f7b4b16c'/>
<id>urn:sha1:facdbdfe0e6202d74758387ae9189c39f7b4b16c</id>
<content type='text'>
Turns out that we would en up in a bad state if we attempt to attach
twice the same HID-BPF struct_ops, so have a test for it.

Link: https://patch.msgid.link/20240723-fix-6-11-bpf-v1-4-b9d770346784@kernel.org
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/hid: disable struct_ops auto-attach</title>
<updated>2024-07-24T16:27:21Z</updated>
<author>
<name>Benjamin Tissoires</name>
<email>bentiss@kernel.org</email>
</author>
<published>2024-07-23T16:21:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f64c1a4593391c57accf32693a14ef45f8162b5c'/>
<id>urn:sha1:f64c1a4593391c57accf32693a14ef45f8162b5c</id>
<content type='text'>
Since commit 08ac454e258e ("libbpf: Auto-attach struct_ops BPF maps in
BPF skeleton"), libbpf automatically calls bpf_map__attach_struct_ops()
on every struct_ops it sees in the bpf object. The problem is that
our test bpf object has many of them but only one should be manually
loaded at a time, or we end up locking the syscall.

Link: https://patch.msgid.link/20240723-fix-6-11-bpf-v1-2-b9d770346784@kernel.org
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
</feed>
