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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c89bb8a7-e239-66d2-d94e-e0a2120469af@synopsys.com>
Date:   Wed, 9 Mar 2022 20:11:04 +0000
From:   Thinh Nguyen <Thinh.Nguyen@...opsys.com>
To:     Wesley Cheng <quic_wcheng@...cinc.com>,
        "balbi@...nel.org" <balbi@...nel.org>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC:     "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "quic_jackp@...cinc.com" <quic_jackp@...cinc.com>
Subject: Re: [PATCH] usb: dwc3: gadget: Wait for ep0 xfers to complete during
 dequeue

Thinh Nguyen wrote:
> Hi,
> 
> Wesley Cheng wrote:
>> From: Thinh Nguyen <Thinh.Nguyen@...opsys.com>
>>
>> If the request being dequeued is currently active, then the current
>> logic is to issue a stop transfer command, and allow the command
>> completion to cleanup the cancelled list.  The DWC3 controller will
>> run into an end transfer command timeout if there is an ongoing EP0
>> transaction.  If this is the case, wait for the EP0 completion event
>> before proceeding to retry the endxfer command again.
> 
> Can you fix the commit message as follow:
> 
> If a Setup packet is received but yet to DMA out, the controller will
> not process the End Transfer command of any endpoint. Polling of its
> DEPCMD.CmdAct may block setting up TRB for Setup packet, causing a
> command timeout.
> 
> This may occur if the driver doesn’t service the completion interrupt of
> the control status stage yet due to system latency, then it won’t
> prepare TRB and start the transfer for the next Setup Stage. To the host
> side, the control transfer had completed, and the host can send a new
> Setup packet at this point.
> 
> In the meanwhile, if the driver receives an async call to dequeue a
> request (triggering End Transfer) to any endpoint, then the driver will
> service that End transfer first, blocking the control status stage
> completion handler. Since no TRB is available for the Setup stage, the
> Setup packet can’t be DMA’ed out and the End Transfer gets hung.
> 
> The driver must not block setting up of the Setup stage. So track and
> only issue the End Transfer command only when there’s Setup TRB prepared
> so that the controller can DMA out the Setup packet. Delay the End
> transfer command until there's no Setup TRB available. This is

typo:
Delay the End transfer command *if* there's no Setup TRB available.


> applicable to all DWC_usb3x IPs.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ