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: <YQD4U67wFqtXBGu1@kroah.com>
Date:   Wed, 28 Jul 2021 08:25:23 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Maxim Devaev <mdevaev@...il.com>
Cc:     balbi@...nel.org, sandeen@...hat.com, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: gadget: f_hid: idle uses the highest byte for
 duration

On Tue, Jul 27, 2021 at 09:58:00PM +0300, Maxim Devaev wrote:
> SET_IDLE value must be shifted 8 bits to the right to get duration.
> This confirmed by USBCV test.
> 
> Signed-off-by: Maxim Devaev <mdevaev@...il.com>
> ---
>  drivers/usb/gadget/function/f_hid.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c
> index 8d50c8b12..bb476e121 100644
> --- a/drivers/usb/gadget/function/f_hid.c
> +++ b/drivers/usb/gadget/function/f_hid.c
> @@ -573,7 +573,7 @@ static int hidg_setup(struct usb_function *f,
>  		  | HID_REQ_SET_IDLE):
>  		VDBG(cdev, "set_idle\n");
>  		length = 0;
> -		hidg->idle = value;
> +		hidg->idle = value >> 8;
>  		goto respond;
>  		break;
>  
> -- 
> 2.32.0
> 

You forgot to mention what commit this fixes up:

Fixes: afcff6dc690e ("usb: gadget: f_hid: added GET_IDLE and SET_IDLE handlers")

I've added it to the patch now, but try to remember it next time.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ