From: "Arnd Bergmann" <arnd@arndb.de>
To: "Benjamin Tissoires" <bentiss@kernel.org>,
"Jiri Kosina" <jikos@kernel.org>, shuah <shuah@kernel.org>,
"Arnd Bergmann" <arnd@kernel.org>
Cc: linux-input@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] HID: tighten ioctl command parsing
Date: Wed, 27 Aug 2025 15:45:01 +0200 [thread overview]
Message-ID: <6df083db-b1d5-4c80-96f7-e6b787bd357c@app.fastmail.com> (raw)
In-Reply-To: <20250826-b4-hidraw-ioctls-v2-3-c7726b236719@kernel.org>
On Tue, Aug 26, 2025, at 14:39, bentiss@kernel.org wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The handling for variable-length ioctl commands in hidraw_ioctl() is
> rather complex and the check for the data direction is incomplete.
>
> Simplify this code by factoring out the various ioctls grouped by dir
> and size, and using a switch() statement with the size masked out, to
> ensure the rest of the command is correctly matched.
>
> Fixes: 9188e79ec3fd ("HID: add phys and name ioctls to hidraw")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Hi Benjamin,
Thanks for fixing my botched patch and sending the new version,
looks good to me.
Since you already rewrote most of it, I think this should be attributed
to you though, so maybe make that just 'Reported-by: Arnd Bergmann
<arnd@arndb.de>' and make you the author?
Arnd
prev parent reply other threads:[~2025-08-27 13:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-26 12:39 [PATCH v2 0/3] HID: hidraw: rework ioctls Benjamin Tissoires
2025-08-26 12:39 ` [PATCH v2 1/3] selftests/hid: hidraw: add more coverage for hidraw ioctls Benjamin Tissoires
2025-08-26 12:39 ` [PATCH v2 2/3] selftests/hid: hidraw: forge wrong ioctls and tests them Benjamin Tissoires
2025-08-26 12:39 ` [PATCH v2 3/3] HID: tighten ioctl command parsing bentiss
2025-08-27 13:45 ` Arnd Bergmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6df083db-b1d5-4c80-96f7-e6b787bd357c@app.fastmail.com \
--to=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®