[PATCH v3 0/3] HID: hidraw: rework ioctls

Benjamin Tissoires posted 3 patches 2 weeks, 5 days ago
drivers/hid/hidraw.c                     | 224 ++++++++-------
include/uapi/linux/hidraw.h              |   2 +
tools/testing/selftests/hid/hid_common.h |   6 +
tools/testing/selftests/hid/hidraw.c     | 473 +++++++++++++++++++++++++++++++
4 files changed, 603 insertions(+), 102 deletions(-)
[PATCH v3 0/3] HID: hidraw: rework ioctls
Posted by Benjamin Tissoires 2 weeks, 5 days ago
Arnd sent the v1 of the series in July, and it was bogus. So with a
little help from claude-sonnet I built up the missing ioctls tests and
tried to figure out a way to apply Arnd's logic without breaking the
existing ioctls.

The end result is in patch 3/3, which makes use of subfunctions to keep
the main ioctl code path clean.

Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
---
Changes in v3:
- dropped the co-developed-by tag and put a blurb instead
- change the attribution of patch 3/3 to me as requested by Arnd.
- Link to v2: https://lore.kernel.org/r/20250826-b4-hidraw-ioctls-v2-0-c7726b236719@kernel.org

changes in v2:
- add new hidraw ioctls tests
- refactor Arnd's patch to keep the existing error path logic
- link to v1: https://lore.kernel.org/linux-input/20250711072847.2836962-1-arnd@kernel.org/

---
Benjamin Tissoires (3):
      selftests/hid: hidraw: add more coverage for hidraw ioctls
      selftests/hid: hidraw: forge wrong ioctls and tests them
      HID: hidraw: tighten ioctl command parsing

 drivers/hid/hidraw.c                     | 224 ++++++++-------
 include/uapi/linux/hidraw.h              |   2 +
 tools/testing/selftests/hid/hid_common.h |   6 +
 tools/testing/selftests/hid/hidraw.c     | 473 +++++++++++++++++++++++++++++++
 4 files changed, 603 insertions(+), 102 deletions(-)
---
base-commit: 02d6eeedbc36d4b309d5518778071a749ef79c4e
change-id: 20250825-b4-hidraw-ioctls-66f34297032a

Best regards,
-- 
Benjamin Tissoires <bentiss@kernel.org>
Re: [PATCH v3 0/3] HID: hidraw: rework ioctls
Posted by Jiri Kosina 2 weeks, 1 day ago
On Fri, 12 Sep 2025, Benjamin Tissoires wrote:

> Arnd sent the v1 of the series in July, and it was bogus. So with a
> little help from claude-sonnet I built up the missing ioctls tests and
> tried to figure out a way to apply Arnd's logic without breaking the
> existing ioctls.
> 
> The end result is in patch 3/3, which makes use of subfunctions to keep
> the main ioctl code path clean.
> 
> Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
> ---
> Changes in v3:
> - dropped the co-developed-by tag and put a blurb instead
> - change the attribution of patch 3/3 to me as requested by Arnd.
> - Link to v2: https://lore.kernel.org/r/20250826-b4-hidraw-ioctls-v2-0-c7726b236719@kernel.org
> 
> changes in v2:
> - add new hidraw ioctls tests
> - refactor Arnd's patch to keep the existing error path logic
> - link to v1: https://lore.kernel.org/linux-input/20250711072847.2836962-1-arnd@kernel.org/

Now queued in hid.git#for-6.18/hidraw, thanks a lot Arnd and Benjamin!

-- 
Jiri Kosina
SUSE Labs