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: <HK0PR06MB3202AAE5C89029C64399DD3680679@HK0PR06MB3202.apcprd06.prod.outlook.com>
Date:   Tue, 30 Nov 2021 09:49:15 +0000
From:   Neal Liu <neal_liu@...eedtech.com>
To:     Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Felipe Balbi <balbi@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Joel Stanley <joel@....id.au>,
        Andrew Jeffery <andrew@...id.au>,
        Cai Huoqing <caihuoqing@...du.com>,
        Tao Ren <rentao.bupt@...il.com>,
        Julia Lawall <julia.lawall@...ia.fr>,
        kernel test robot <lkp@...el.com>,
        Sasha Levin <sashal@...nel.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-aspeed@...ts.ozlabs.org" <linux-aspeed@...ts.ozlabs.org>
Subject: RE: [PATCH 3/3] usb: aspeed-vhub: fix ep0 OUT ack received wrong
 length issue

> -----Original Message-----
> From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
> Sent: Tuesday, November 30, 2021 7:49 AM
> To: Neal Liu <neal_liu@...eedtech.com>; Felipe Balbi <balbi@...nel.org>;
> Greg Kroah-Hartman <gregkh@...uxfoundation.org>; Joel Stanley
> <joel@....id.au>; Andrew Jeffery <andrew@...id.au>; Cai Huoqing
> <caihuoqing@...du.com>; Tao Ren <rentao.bupt@...il.com>; Julia Lawall
> <julia.lawall@...ia.fr>; kernel test robot <lkp@...el.com>; Sasha Levin
> <sashal@...nel.org>; linux-usb@...r.kernel.org; linux-kernel@...r.kernel.org;
> linux-arm-kernel@...ts.infradead.org; linux-aspeed@...ts.ozlabs.org
> Cc: BMC-SW <BMC-SW@...eedtech.com>
> Subject: Re: [PATCH 3/3] usb: aspeed-vhub: fix ep0 OUT ack received wrong
> length issue
> 
> On Fri, 2021-11-26 at 19:09 +0800, Neal Liu wrote:
> >
> > diff --git a/drivers/usb/gadget/udc/aspeed-vhub/ep0.c
> > b/drivers/usb/gadget/udc/aspeed-vhub/ep0.c
> > index 74ea36c19b1e..bea9cbb191a2 100644
> > --- a/drivers/usb/gadget/udc/aspeed-vhub/ep0.c
> > +++ b/drivers/usb/gadget/udc/aspeed-vhub/ep0.c
> > @@ -251,6 +251,13 @@ static void ast_vhub_ep0_do_receive(struct
> > ast_vhub_ep *ep, struct ast_vhub_req
> >  		len = remain;
> >  		rc = -EOVERFLOW;
> >  	}
> > +
> > +	/* HW return wrong data len */
> > +	if (len < ep->ep.maxpacket && len != remain) {
> > +		EPDBG(ep, "using expected data len instead\n");
> > +		len = remain;
> > +	}
> > +
> 
> Wow, that is a nasty hw bug ! Patch looks good, I had to swap some of that
> logic back into my brain but it looks like it won't break any normal case :-)
> 
> Acked-by: Benjamin Herrenschmidt <benh@...nel.crashing.org>
> 
> Cheers,
> Ben.

Thanks for your review.
-Neal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ