linux/tools/testing
Trung Nguyen b6eb022890 selftests/hid: multitouch: test a large ContactCountMaximum
Add a regression test for the out-of-bounds bit operations on
struct mt_device.mt_io_flags.

A HID multitouch device can advertise a ContactCountMaximum far larger
than the number of contacts a single report describes, up to 255. The
driver used to keep the per-slot active state in the bits of a single
unsigned long and index set_bit()/clear_bit() by the slot number, so such
a device drove those operations out of bounds. The sticky-fingers release
timer made it fatal: mt_release_contacts() cleared one bit per slot and
overwrote the adjacent members of struct mt_device.

The new device advertises a ContactCountMaximum of 250 while exposing only
a few finger collections (a large contact count cannot be expressed with
one finger collection per contact within the HID descriptor size limit).
The test sends a single contact and lets the 100ms sticky-fingers timer
release it. A kernel without the fix panics in mt_release_contacts(); a
fixed kernel reports the release cleanly.

Signed-off-by: Trung Nguyen <trungnh@cystack.net>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2026-07-01 20:36:12 +02:00
..
crypto/chacha20-s390 crypto: drbg - Fold include/crypto/drbg.h into crypto/drbg.c 2026-05-07 16:09:59 +08:00
cxl cxl/test: Update mock dev array before calling platform_device_add() 2026-05-26 13:54:17 -07:00
fault-injection
ktest ktest: Add logfile to failure directory 2026-04-20 15:23:13 -04:00
kunit kunit:tool: Don't write to stdout when it should be disabled 2026-06-07 20:10:30 -06:00
memblock tools/testing/memblock: fix stale NUMA reservation tests 2026-06-02 08:34:03 +03:00
nvdimm tools/testing/nvdimm: Use per-DIMM device handle 2025-11-03 16:47:13 -06:00
radix-tree MAINTAINERS: update Liam's email address 2026-04-27 05:54:25 -07:00
rbtree
scatterlist mm: remove nth_page() 2025-09-21 14:22:10 -07:00
selftests selftests/hid: multitouch: test a large ContactCountMaximum 2026-07-01 20:36:12 +02:00
shared mm/slab: improve kmem_cache_alloc_bulk 2026-06-03 18:20:43 +02:00
vma mm/vma: do not try to unmap a VMA if mmap_prepare() invoked from mmap() 2026-04-27 05:54:24 -07:00
vsock vsock/test: add MSG_PEEK after partial recv test 2026-04-16 19:34:22 -07:00