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:   Thu, 9 Mar 2017 11:34:00 +0200
From:   Roger Quadros <rogerq@...com>
To:     <laurent.pinchart@...asonboard.com>, <balbi@...nel.org>
CC:     <b-liu@...com>, <nsekhar@...com>, <linux-usb@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <stable@...r.kernel.org>
Subject: Re: [PATCH 1/2] usb: gadget: f_uvc: Fix SuperSpeed companion
 descriptor's wBytesPerInterval

Felipe,

On 08/03/17 16:05, Roger Quadros wrote:
> The streaming_maxburst module parameter is 0 offset (0..15)
> so we must add 1 while using it for wBytesPerInterval
> calculation for the SuperSpeed companion descriptor.
> 
> Without this host uvcvideo driver will always see the wrong
> wBytesPerInterval for SuperSpeed uvc gadget and may not find
> a suitable video interface endpoint.
> e.g. for streaming_maxburst = 0 case it will always
> fail as wBytePerInterval was evaluating to 0.
> 
> Cc: stable@...r.kernel.org
> Signed-off-by: Roger Quadros <rogerq@...com>

Please pick this one for v4.11-rc with Laurent's Reviewed-by. Thanks.

> ---
>  drivers/usb/gadget/function/f_uvc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c
> index 29b41b5..c7689d0 100644
> --- a/drivers/usb/gadget/function/f_uvc.c
> +++ b/drivers/usb/gadget/function/f_uvc.c
> @@ -625,7 +625,7 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f)
>  	uvc_ss_streaming_comp.bMaxBurst = opts->streaming_maxburst;
>  	uvc_ss_streaming_comp.wBytesPerInterval =
>  		cpu_to_le16(max_packet_size * max_packet_mult *
> -			    opts->streaming_maxburst);
> +			    (opts->streaming_maxburst + 1));
>  
>  	/* Allocate endpoints. */
>  	ep = usb_ep_autoconfig(cdev->gadget, &uvc_control_ep);
> 

-- 
cheers,
-roger

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ