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  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]
Date:   Fri, 07 Dec 2018 08:05:39 +0200
From:   Felipe Balbi <>
To:     Anurag Kumar Vulisha <>,
        Alan Stern <>
Cc:     Greg Kroah-Hartman <>,
        Shuah Khan <>, Johan Hovold <>,
        Jaejoong Kim <>,
        Benjamin Herrenschmidt <>,
        Roger Quadros <>,
        Manu Gautam <>,
        "martin.petersen\" <>,
        Bart Van Assche <>,
        Mike Christie <>,
        Matthew Wilcox <>,
        Colin Ian King <>,
        "linux-usb\" <>,
        "linux-kernel\" <>,
        "v.anuragkumar\" <>,
        Thinh Nguyen <>,
        Tejas Joglekar <>,
        Ajay Yugalkishore Pandey <>
Subject: RE: [PATCH v7 01/10] usb: gadget: udc: Add timer support for usb requests


Anurag Kumar Vulisha <> writes:
>>Does the data book suggest a value for the timeout?
> No, the databook doesn't mention about the timeout value
>>> >At this point, it seems that the generic approach will be messier than having every
>>> >controller driver implement its own fix.  At least, that's how it appears to me.

Why, if the UDC implementation will, anyway, be a timer?

>>(Especially if dwc3 is the only driver affected.)
> As discussed above, the issue may happen with other gadgets too. As I got divide opinions
> on this implementation and both the implementations looks fine to me, I am little confused
> on which should be implemented.
> @Felipe: Do you agree with Alan's implementation? Please let us know your suggestion
> on this.

I still think a generic timer is a better solution since it has other uses.

>>> >Ideally it would not be necessary to rely on a timeout at all.
>>> >
>>> >Also, maintainers dislike module parameters.  It would be better not to add one.
>>> Okay. I would be happy if any alternative for this issue is present but unfortunately
>>> I am not able to figure out any alternative other than timers. If not
>>> we can add an configfs entry in stream gadget to update the timeout. Please
>>> your opinion on this approach.
>>Since the purpose of the timeout is to detect a deadlock caused by a
>>hardware bug, I suggest a fixed and relatively short timeout value such
>>as one second.  Cancelling and requeuing a few requests at 1-second
>>intervals shouldn't add very much overhead.

I wouldn't call this a HW bug though. This is just how the UDC
behaves. There are N streams and host can move data in any stream at any
time. This means that host & gadget _can_ disagree on what stream to
start next.

One way to avoid this would be to never pre-start any streams and always
rely on XferNotReady, but that would mean greatly reduced throughput for


Powered by blists - more mailing lists