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: <20210628065553.GA83203@ubuntu>
Date:   Mon, 28 Jun 2021 15:55:53 +0900
From:   Jung Daehwan <dh10.jung@...sung.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Mathias Nyman <mathias.nyman@...el.com>, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: usb: host: Reduce xhci_handshake timeout in xhci_reset

On Mon, Jun 28, 2021 at 08:53:02AM +0200, Greg Kroah-Hartman wrote:
> On Mon, Jun 28, 2021 at 11:25:48AM +0900, Jung Daehwan wrote:
> > On Tue, Jun 22, 2021 at 09:56:20PM +0200, Greg Kroah-Hartman wrote:
> > > On Tue, Jun 22, 2021 at 08:24:56PM +0900, Daehwan Jung wrote:
> > > > It seems 10 secs timeout is too long in general case. A core would wait for
> > > > 10 secs without doing other task and it can be happended on every device.
> > >
> > > Only if the handshake does not come back sooner, right?
> >
> > Yes, right.
> >
> > > What is causing your device to timeout here?
> >
> > Host Controller doesn't respond handshake. I don't know why and I ask HW team
> > to debug it.
>
> Please work to fix your hardware, that feels like the root of the
> problem here.  If you require the timeout for xhci_reset() to happen,
> then how do you know that the hardware really did reset properly in the
> reduced amount of time you just provided?
>

I continue fixing this issue with hardware engineer, but currently just
host controller can crash whole system and that's why I want to fix it.
How about adding some error logs in this situation for recognizing this issue?
We can add error log in xhci_stop as xhci_reset can returns error like below.

static void xhci_stop(struct usb_hcd *hcd)
{
        u32 temp;
        struct xhci_hcd *xhci = hcd_to_xhci(hcd);
+       int ret;

        mutex_lock(&xhci->mutex);

@@ -733,6 +734,9 @@ static void xhci_stop(struct usb_hcd *hcd)
        xhci->cmd_ring_state = CMD_RING_STATE_STOPPED;
        xhci_halt(xhci);
        xhci_reset(xhci);
+       if (ret)
+               xhci_err(xhci, "%s: Error while reset xhci Host controller - ret = %d\n"
+                       , __func__, ret);
        spin_unlock_irq(&xhci->lock);


> thanks,
>
> greg k-h
>




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ