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] [day] [month] [year] [list]
Date:   Mon, 28 Aug 2023 17:42:36 +0200
From:   Andrey Konovalov <andreyknvl@...il.com>
To:     Alan Stern <stern@...land.harvard.edu>
Cc:     andrey.konovalov@...ux.dev,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Felipe Balbi <balbi@...nel.org>,
        Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
        Pawel Laszczak <pawell@...ence.com>,
        Chunfeng Yun <chunfeng.yun@...iatek.com>,
        Minas Harutyunyan <hminas@...opsys.com>,
        Justin Chen <justin.chen@...adcom.com>,
        Al Cooper <alcooperx@...il.com>,
        Herve Codina <herve.codina@...tlin.com>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] usb: gadgetfs: return USB_GADGET_DELAYED_STATUS from setup()

On Mon, Aug 28, 2023 at 4:52 PM Alan Stern <stern@...land.harvard.edu> wrote:
>
> On Mon, Aug 28, 2023 at 04:10:32AM +0200, andrey.konovalov@...ux.dev wrote:
> > From: Andrey Konovalov <andreyknvl@...il.com>
> >
> > Return USB_GADGET_DELAYED_STATUS from the setup() callback for 0-length
> > transfers as a workaround to stop some UDC drivers (e.g. dwc3) from
> > automatically proceeding with the status stage.
> >
> > This workaround should be removed once all UDC drivers are fixed to
> > always delay the status stage until a response is queued to EP0.
> >
> > Signed-off-by: Andrey Konovalov <andreyknvl@...il.com>
> > ---
> >  drivers/usb/gadget/legacy/inode.c | 15 ++++++++++++++-
> >  1 file changed, 14 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c
> > index 28249d0bf062..154bbf578ba2 100644
> > --- a/drivers/usb/gadget/legacy/inode.c
> > +++ b/drivers/usb/gadget/legacy/inode.c
> > @@ -31,6 +31,7 @@
> >
> >  #include <linux/usb/gadgetfs.h>
> >  #include <linux/usb/gadget.h>
> > +#include <linux/usb/composite.h>
>
> Add:  /* for USB_GADGET_DELAYED_STATUS */

Will do in v2.

> > +#undef ERROR
> >  #define ERROR(dev,fmt,args...) \
> >       xprintk(dev , KERN_ERR , fmt , ## args)
> > +#undef INFO
>
> Please move these #undef lines up, just after the new #include.  And
> add a comment explaining briefly why they are needed.

Will do in v2.

>
> Aside from these changes,
>
> Reviewed-by: Alan Stern <stern@...land.harvard.edu>

Thank you, Alan!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ