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] [day] [month] [year] [list]
Date:   Fri, 25 Sep 2020 17:56:06 -0700
From:   Kenneth Albanowski <kenalba@...gle.com>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:     Jiri Kosina <jikos@...nel.org>,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] HID: hid-input: fix stylus battery reporting

[Re-send to appease the mail daemons]

Confirmed, I've validated this on a 4.19 derivative, this fixes the
problem and battery strength gets reported again.

- Kenneth Albanowski


On Fri, Sep 25, 2020 at 4:35 PM Dmitry Torokhov
<dmitry.torokhov@...il.com> wrote:
>
> With commit 4f3882177240 hid-input started clearing of "ignored" usages
> to avoid using garbage that might have been left in them. However
> "battery strength" usages should not be ignored, as we do want to
> use them.
>
> Fixes: 4f3882177240 ("HID: hid-input: clear unmapped usages")
> Reported-by: Kenneth Albanowski <kenalba@...gle.com>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
> ---
>
> Kenneth, can you please try this one and see if it fixes your issue?
>
>  drivers/hid/hid-input.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> index dea9cc65bf80..5da631d2ec9b 100644
> --- a/drivers/hid/hid-input.c
> +++ b/drivers/hid/hid-input.c
> @@ -797,7 +797,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
>                 case 0x3b: /* Battery Strength */
>                         hidinput_setup_battery(device, HID_INPUT_REPORT, field);
>                         usage->type = EV_PWR;
> -                       goto ignore;
> +                       return;
>
>                 case 0x3c: /* Invert */
>                         map_key_clear(BTN_TOOL_RUBBER);
> @@ -1059,7 +1059,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
>                 case HID_DC_BATTERYSTRENGTH:
>                         hidinput_setup_battery(device, HID_INPUT_REPORT, field);
>                         usage->type = EV_PWR;
> -                       goto ignore;
> +                       return;
>                 }
>                 goto unknown;
>
> --
> 2.28.0.681.g6f77f65b4e-goog
>
>
> --
> Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ