lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <32f116c30f1f071d57e8e2d15425178cbccf9b70.camel@hadess.net>
Date:   Thu, 11 Aug 2022 15:19:50 +0200
From:   Bastien Nocera <hadess@...ess.net>
To:     Nate Yocom <nate@...om.org>, dmitry.torokhov@...il.com
Cc:     linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] Input: joystick: xpad: Add X-Box Adaptive Controller
 support

Hey,

On Wed, 2022-08-10 at 07:15 -0700, Nate Yocom wrote:
> +               /*
> +                * X-Box Adaptive controller sets 0x02 when x-box
> button is pressed,
> +                * we could probably condense into just data[4] != 0,
> but explicitly
> +                * checking here ensures no regression if other
> devices set other bits.
> +                */
> +               if (le16_to_cpu(xpad->dev->id.vendor) == 0x045e &&
> +                       le16_to_cpu(xpad->dev->id.product) == 0x0b0a)
> +                       input_report_key(dev, BTN_MODE, data[4] &
> 0x02);
> +               else
> +                       input_report_key(dev, BTN_MODE, data[4] &
> 0x01);


I won't be able to test the patch until next week, but I would actually
implement what you mention in the comment as a separate patch. This
would avoid having a special-case for a specific VID/PID without a
quirk like "MAP_LAYER_BUTTON" defined, and if it were to cause
problems, it would be straight forward to revert.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ