1. 02 Feb, 2024 4 commits
  2. 31 Jan, 2024 1 commit
    • Javier Carrasco's avatar
      Input: bcm5974 - check endpoint type before starting traffic · 2b9c3eb3
      Javier Carrasco authored
      syzbot has found a type mismatch between a USB pipe and the transfer
      endpoint, which is triggered by the bcm5974 driver[1].
      
      This driver expects the device to provide input interrupt endpoints and
      if that is not the case, the driver registration should terminate.
      
      Repros are available to reproduce this issue with a certain setup for
      the dummy_hcd, leading to an interrupt/bulk mismatch which is caught in
      the USB core after calling usb_submit_urb() with the following message:
      "BOGUS urb xfer, pipe 1 != type 3"
      
      Some other device drivers (like the appletouch driver bcm5974 is mainly
      based on) provide some checking mechanism to make sure that an IN
      interrupt endpoint is available. In this particular case the endpoint
      addresses are provided by a config table, so the checking can be
      targeted to the provided endpoints.
      
      Add some basic checking to guarantee that the endpoints available match
      the expected type for both the trackpad and button endpoints.
      
      This issue was only found for the trackpad endpoint, but the checking
      has been added to the button endpoint as well for the same reasons.
      
      Given that there was never a check for the endpoint type, this bug has
      been there since the first implementation of the driver (f89bd95c).
      
      [1] https://syzkaller.appspot.com/bug?extid=348331f63b034f89b622
      
      Fixes: f89bd95c ("Input: bcm5974 - add driver for Macbook Air and Pro Penryn touchpads")
      Signed-off-by: default avatarJavier Carrasco <javier.carrasco.cruz@gmail.com>
      Reported-and-tested-by: syzbot+348331f63b034f89b622@syzkaller.appspotmail.com
      Link: https://lore.kernel.org/r/20231007-topic-bcm5974_bulk-v3-1-d0f38b9d2935@gmail.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      2b9c3eb3
  3. 30 Jan, 2024 1 commit
    • Brenton Simpson's avatar
      Input: xpad - add Lenovo Legion Go controllers · 80441f76
      Brenton Simpson authored
      The Lenovo Legion Go is a handheld gaming system, similar to a Steam Deck.
      It has a gamepad (including rear paddles), 3 gyroscopes, a trackpad,
      volume buttons, a power button, and 2 LED ring lights.
      
      The Legion Go firmware presents these controls as a USB hub with various
      devices attached.  In its default state, the gamepad is presented as an
      Xbox controller connected to this hub.  (By holding a combination of
      buttons, it can be changed to use the older DirectInput API.)
      
      This patch teaches the existing Xbox controller module `xpad` to bind to
      the controller in the Legion Go, which enables support for the:
      
      - directional pad,
      - analog sticks (including clicks),
      - X, Y, A, B,
      - start and select (or menu and capture),
      - shoulder buttons, and
      - rumble.
      
      The trackpad, touchscreen, volume controls, and power button are already
      supported via existing kernel modules.  Two of the face buttons, the
      gyroscopes, rear paddles, and LEDs are not.
      
      After this patch lands, the Legion Go will be mostly functional in Linux,
      out-of-the-box.  The various components of the USB hub can be synthesized
      into a single logical controller (including the additional buttons) in
      userspace with [Handheld Daemon](https://github.com/hhd-dev/hhd), which
      makes the Go fully functional.
      Signed-off-by: default avatarBrenton Simpson <appsforartists@google.com>
      Link: https://lore.kernel.org/r/20240118183546.418064-1-appsforartists@google.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      80441f76
  4. 19 Jan, 2024 1 commit
  5. 16 Jan, 2024 1 commit
  6. 14 Jan, 2024 1 commit
  7. 10 Jan, 2024 2 commits
  8. 04 Jan, 2024 2 commits
  9. 01 Jan, 2024 4 commits
  10. 29 Dec, 2023 1 commit
  11. 24 Dec, 2023 3 commits
  12. 23 Dec, 2023 2 commits
  13. 15 Dec, 2023 3 commits
  14. 14 Dec, 2023 11 commits
  15. 13 Dec, 2023 3 commits