From: sashiko-bot@kernel.org
To: "Iván Ezequiel Rodriguez" <ivanrwcm25@gmail.com>
Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org
Subject: Re: [PATCH v1 2/2] Input: uinput: align UI_ABS_SETUP validation with uapi docs
Date: Mon, 31 Aug 2026 18:42:29 +0000 [thread overview]
Message-ID: <20260831184230.649881F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260831152156.166514-3-ivanrwcm25@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Critical] Adding a strict minimum == 0 validation for ABS_MT_SLOT breaks backward compatibility by rejecting previously accepted configurations.
--
commit 12ce67adcfd7a78984b09163e522a86103b65a3c
Author: Iván Ezequiel Rodriguez <ivanrwcm25@gmail.com>
Input: uinput: align UI_ABS_SETUP validation with uapi docs
This commit updates uinput to align with UAPI documentation by returning
-EINVAL for out-of-range axis codes. It also adds a strict validation check
to reject ABS_MT_SLOT configurations if the minimum value is not zero.
> diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
> index d32fa4b508fc5..e05c80182252d 100644
> --- a/drivers/input/misc/uinput.c
> +++ b/drivers/input/misc/uinput.c
> @@ -424,6 +424,13 @@ static int uinput_validate_absinfo(struct input_dev *dev, unsigned int code,
> min = abs->minimum;
> max = abs->maximum;
>
> + if (code == ABS_MT_SLOT && min != 0) {
> + printk(KERN_DEBUG
> + "%s: abs[%02x] minimum must be 0\n",
> + UINPUT_NAME, code);
> + return -EINVAL;
> + }
[Severity: Critical]
Does adding this strict validation break backward compatibility for existing
userspace applications?
Applications that historically passed non-zero minimum values for ABS_MT_SLOT
(which the kernel silently accepted and later clamped to 0) will now fail to
initialize uinput devices, receiving -EINVAL during the UI_ABS_SETUP ioctl.
This introduces a userspace regression by rejecting previously accepted
configurations.
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260831152156.166514-1-ivanrwcm25@gmail.com?part=2
next prev parent reply other threads:[~2026-08-31 18:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 15:21 [PATCH v1 0/2] Input: evdev/uinput errno alignment Iván Ezequiel Rodriguez
2026-08-31 15:21 ` [PATCH v1 1/2] Input: evdev: propagate EVIOCSFF copy errors correctly Iván Ezequiel Rodriguez
2026-08-31 18:30 ` sashiko-bot
2026-08-31 15:21 ` [PATCH v1 2/2] Input: uinput: align UI_ABS_SETUP validation with uapi docs Iván Ezequiel Rodriguez
2026-08-31 18:42 ` sashiko-bot [this message]
2026-08-31 19:27 ` [PATCH v2 0/2] Input: evdev/uinput errno alignment Iván Ezequiel Rodriguez
2026-08-31 19:27 ` [PATCH v2 1/2] Input: evdev: propagate EVIOCSFF copy errors correctly Iván Ezequiel Rodriguez
2026-08-31 21:35 ` sashiko-bot
2026-08-31 19:27 ` [PATCH v2 2/2] Input: uinput: return -EINVAL for out-of-range UI_ABS_SETUP axis code Iván Ezequiel Rodriguez
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=20260831184230.649881F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=ivanrwcm25@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.