Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH v1 0/2] Input: evdev/uinput errno alignment
@ 2026-08-31 15:21 Iván Ezequiel Rodriguez
  2026-08-31 15:21 ` [PATCH v1 1/2] Input: evdev: propagate EVIOCSFF copy errors correctly Iván Ezequiel Rodriguez
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Iván Ezequiel Rodriguez @ 2026-08-31 15:21 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, linux-kernel, Iván Ezequiel Rodriguez

Hi,

Two small fixes so ioctl failures match what helpers and uapi docs
already document.

Patch 1 propagates the return value of input_ff_effect_from_user()
from EVIOCSFF instead of always mapping failures to -EFAULT (wrong
size becomes -EINVAL).

Patch 2 returns -EINVAL for UI_ABS_SETUP when the axis code is out of
range (was -ERANGE) and rejects ABS_MT_SLOT with a non-zero minimum.

Base: v7.3-rc1

Tested: built bzImage with CONFIG_INPUT_UINPUT=y and CONFIG_INPUT_EVDEV=y;
QEMU initramfs smoke:

  - UI_ABS_SETUP with code > ABS_MAX → EINVAL
  - UI_ABS_SETUP ABS_MT_SLOT with min != 0 → EINVAL
  - EVIOCSFF with wrong size → EINVAL

Thanks,
Iván

Iván Ezequiel Rodriguez (2):
  Input: evdev: propagate EVIOCSFF copy errors correctly
  Input: uinput: align UI_ABS_SETUP validation with uapi docs

 drivers/input/evdev.c       | 5 +++--
 drivers/input/misc/uinput.c | 9 ++++++++-
 2 files changed, 11 insertions(+), 3 deletions(-)

-- 
2.43.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-08-31 21:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox