Skip to content
  1. Aug 16, 2023
  2. Jul 13, 2023
    • Werner Sembach's avatar
      Input: i8042 - add quirk for TUXEDO Gemini 17 Gen1/Clevo PD70PN · eb09074b
      Werner Sembach authored
      
      
      The touchpad of this device is both connected via PS/2 and i2c. This causes
      strange behavior when both driver fight for control. The easy fix is to
      prevent the PS/2 driver from accessing the mouse port as the full feature
      set of the touchpad is only supported in the i2c interface anyway.
      
      The strange behavior in this case is, that when an external screen is
      connected and the notebook is closed, the pointer on the external screen is
      moving to the lower right corner. When the notebook is opened again, this
      movement stops, but the touchpad clicks are unresponsive afterwards until
      reboot.
      
      Signed-off-by: default avatarWerner Sembach <wse@tuxedocomputers.com>
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20230607173331.851192-1-wse@tuxedocomputers.com
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      eb09074b
  3. Jul 06, 2023
  4. Jun 27, 2023
  5. Jun 07, 2023
  6. May 24, 2023
    • Dana Elfassy's avatar
      Input: tests - add test to cover all input_grab_device() function · b0031562
      Dana Elfassy authored
      
      
      Currently input_grab_device() isn't covered by any tests
      Thus, adding a test to cover the cases:
      1. The device is grabbed successfully
      2. Trying to grab a device that is already grabbed by another input
         handle
      
      Signed-off-by: default avatarDana Elfassy <dangel101@gmail.com>
      Tested-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
      Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
      Reviewed-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Link: https://lore.kernel.org/r/20230522215514.722564-1-dangel101@gmail.com
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      b0031562
    • Geert Uytterhoeven's avatar
      Input: gpio-keys - use input_report_key() · 3615536c
      Geert Uytterhoeven authored
      
      
      Use the input_report_key() helper instead of open-coding the same
      operation.
      
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Link: https://lore.kernel.org/r/185f3320e39000159d4bd843fd3119b94c30d607.1684854795.git.geert+renesas@glider.be
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      3615536c
    • Ismael Ferreras Morezuelas's avatar
      Input: xpad - delete a Razer DeathAdder mouse VID/PID entry · feee70f4
      Ismael Ferreras Morezuelas authored
      While doing my research to improve the xpad device names I noticed
      that the 1532:0037 VID/PID seems to be used by the DeathAdder 2013,
      so that Razer Sabertooth instance looked wrong and very suspect to
      me. I didn't see any mention in the official drivers, either.
      
      After doing more research, it turns out that the xpad list
      is used by many other projects (like Steam) as-is [1], this
      issue was reported [2] and Valve/Sam Lantinga fixed it [3]:
      
      [1]: https://github.com/libsdl-org/SDL/blob/dcc5eef0e2395854b254ea2873a4899edab347c6/src/joystick/controller_type.h#L251
      [2]: https://steamcommunity.com/app/353380/discussions/0/1743392486228754770/
      [3]: https://hg.libsdl.org/SDL/rev/29809f6f0271
      
      (With multiple Internet users reporting similar issues, not linked here)
      
      After not being able to find the correct VID/PID combination anywhere
      on the Internet and not receiving any reply from Razer support I did
      some additional detective work, it seems like it presents itself as
      "Razer Sabertooth Gaming Controller (XBOX360)", code 1689:FE00.
      
      Leaving us with this:
       * Razer Sabertooth (1689:fe00)
       * Razer Sabertooth Elite (24c6:5d04)
       * Razer DeathAdder 2013 (1532:0037) [note: not a gamepad]
      
      So, to sum things up; remove this conflicting/duplicate entry:
      
      { 0x1532, 0x0037, "Razer Sabertooth", 0, XTYPE_XBOX360 },
      
      As the real/correct one is already present there, even if
      the Internet as a whole insists on presenting it as the
      Razer Sabertooth Elite, which (by all accounts) is not:
      
      { 0x1689, 0xfe00, "Razer Sabertooth", 0, XTYPE_XBOX360 },
      
      Actual change in SDL2 referencing this kernel issue:
      https://github.com/libsdl-org/SDL/commit/e5e54169754ca5d3e86339d968b20126d9da0a15
      
      For more information of the device, take a look here:
      https://github.com/xboxdrv/xboxdrv/pull/59
      
      You can see a lsusb dump here: https://github.com/xboxdrv/xboxdrv/files/76581/Qa6dBcrv.txt
      
      Fixes: f554f619
      
       ("Input: xpad - sync device IDs with xboxdrv")
      Signed-off-by: default avatarIsmael Ferreras Morezuelas <swyterzone@gmail.com>
      Reviewed-by: default avatarCameron Gutman <aicommander@gmail.com>
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/5c12dbdb-5774-fc68-5c58-ca596383663e@gmail.com
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      feee70f4
  7. May 23, 2023
  8. May 19, 2023
  9. May 18, 2023
  10. May 12, 2023
  11. May 11, 2023
  12. May 09, 2023
  13. May 07, 2023
  14. May 06, 2023
  15. May 03, 2023
    • Dmitry Torokhov's avatar
      Input: avoid calling input_set_abs_val() in the event handling core · 3516fa16
      Dmitry Torokhov authored
      
      
      input_abs_set_val() can nominally call input_alloc_absinfo() which may
      allocate memory with GFP_KERNEL flag. This does not happen when
      input_abs_set_val() is called by the input core to set current MT slot when
      handling a new input event, but it trips certain static analyzers.
      
      Rearrange the code to access the relevant structures directly.
      
      Reported-by: default avatarTeng Qi <starmiku1207184332@gmail.com>
      Reviewed-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
      Link: https://lore.kernel.org/r/ZFBg379uuHjf+YEM@google.com
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      3516fa16
    • Geert Uytterhoeven's avatar
      Input: tests - modular KUnit tests should not depend on KUNIT=y · e0f41f83
      Geert Uytterhoeven authored
      While KUnit tests that cannot be built as a loadable module must depend
      on "KUNIT=y", this is not true for modular tests, where it adds an
      unnecessary limitation.
      
      Fix this by relaxing the dependency to "KUNIT".
      
      Fixes: fdefcbdd
      
       ("Input: Add KUnit tests for some of the input core helper functions")
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
      Link: https://lore.kernel.org/r/483c4f520e4acc6357ebba3e605977b4c56374df.1683022164.git.geert+renesas@glider.be
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      e0f41f83
    • Geert Uytterhoeven's avatar
      Input: tests - fix use-after-free and refcount underflow in input_test_exit() · fd75f369
      Geert Uytterhoeven authored
      With CONFIG_DEBUG_SLAB=y:
      
              # Subtest: input_core
              1..3
          input: Test input device as /devices/virtual/input/input1
          8<--- cut here ---
          Unable to handle kernel paging request at virtual address 6b6b6dd7 when read
          ...
           __lock_acquire from lock_acquire+0x26c/0x300
           lock_acquire from _raw_spin_lock_irqsave+0x50/0x64
           _raw_spin_lock_irqsave from devres_remove+0x20/0x7c
           devres_remove from devres_destroy+0x8/0x24
           devres_destroy from input_free_device+0x2c/0x60
           input_free_device from kunit_try_run_case+0x70/0x94 [kunit]
      
      Without CONFIG_DEBUG_SLAB=y:
      
      	KTAP version 1
      	# Subtest: input_core
      	1..3
          input: Test input device as /devices/virtual/input/input1
          ------------[ cut here ]------------
          WARNING: CPU: 0 PID: 694 at lib/refcount.c:28 refcount_warn_saturate+0x54/0x100
          refcount_t: underflow; use-after-free.
          ...
          Call Trace: [<0037cad4>] dump_stack+0xc/0x10
           [<00377614>] __warn+0x7e/0xb4
           [<0037768c>] warn_slowpath_fmt+0x42/0x62
           [<001eee1c>] refcount_warn_saturate+0x54/0x100
           [<000b1d34>] kfree_const+0x0/0x20
           [<0036290a>] __kobject_del+0x0/0x6e
           [<001eee1c>] refcount_warn_saturate+0x54/0x100
           [<00362a1a>] kobject_put+0xa2/0xb6
           [<11965770>] kunit_generic_run_threadfn_adapter+0x0/0x1c [kunit]
      
      As per the comments for input_allocate_device() and
      input_register_device(), input_free_device() must be called only to free
      devices that have not been registered.  input_unregister_device()
      already calls input_put_device(), thus leading to a use-after-free.
      
      Moreover, the kunit_suite.exit() method is called after every test case,
      even on failures.  As the test itself already does cleanups in its
      failure paths, this may lead to a second use-after-free.
      
      Fix the first issue by dropping the call to input_allocate_device() from
      input_test_exit().
      Fix the second issue by making the cleanup code conditional on a
      successful test.
      
      Fixes: fdefcbdd
      
       ("Input: Add KUnit tests for some of the input core helper functions")
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
      Link: https://lore.kernel.org/r/957b3b309a44d39fb6e38b2a526b250f69ea3d2c.1683022164.git.geert+renesas@glider.be
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      fd75f369
  16. May 02, 2023