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: <20200601035346.GA13752@b29397-desktop>
Date:   Mon, 1 Jun 2020 03:53:22 +0000
From:   Peter Chen <peter.chen@....com>
To:     Michał Mirosław <mirq-linux@...e.qmqm.pl>
CC:     Felipe Balbi <balbi@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: gadget: f_acm: don't disable disabled EP

On 20-05-30 19:15:52, Michał Mirosław wrote:
> On Sat, May 30, 2020 at 01:03:17AM +0000, Peter Chen wrote:
> >  
> > > > > @@ -425,9 +425,11 @@ static int acm_set_alt(struct usb_function *f, unsigned
> > > intf, unsigned alt)
> > > > >  	/* we know alt == 0, so this is an activation or a reset */
> > > > >
> > > > >  	if (intf == acm->ctrl_id) {
> > > > > -		dev_vdbg(&cdev->gadget->dev,
> > > > > -				"reset acm control interface %d\n", intf);
> > > > > -		usb_ep_disable(acm->notify);
> > > > > +		if (acm->notify->enabled) {
> > > > > +			dev_vdbg(&cdev->gadget->dev,
> > > > > +					"reset acm control interface %d\n", intf);
> > > > > +			usb_ep_disable(acm->notify);
> > > > > +		}
> > > >
> > > > But it does not fix any issues, the usb_ep_disable checks 'enabled' flag.
> > > 
> > > It generates spurious trace events if you enable them.
> > You mean the trace events from core.c? If it is, we could try to improve it
> > and indicate it is already enabled or disabled.
> 
> It is indicated in return code, but the problem is that this generates
> noise and wastes debugging time. The problem I was seeing manifested
> itself as disabling disabled EPs and desync of EP state between core
> and UDC driver. The patch avoids the noise and makes the code obvious.
> (This check was there at some point in time, BTW.)
> 

Reviewed-by: Peter Chen <peter.chen@....com>



-- 

Thanks,
Peter Chen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ