All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, andrey.konovalov@linux.dev
Subject: Re: [PATCH] usb: raw-gadget: do not limit transfer length
Date: Tue, 21 Oct 2025 18:06:11 +0200	[thread overview]
Message-ID: <2025102151-footpath-entomb-76da@gregkh> (raw)
In-Reply-To: <CA+fCnZdHJtHgZuD9tiDGD8svXTEdP=GK8HSo71y_UfKgZcaUxg@mail.gmail.com>

On Tue, Oct 21, 2025 at 04:19:13PM +0200, Andrey Konovalov wrote:
> On Tue, Oct 21, 2025 at 4:18 PM Andrey Konovalov <andreyknvl@gmail.com> wrote:
> >
> > On Thu, Sep 4, 2025 at 10:08 PM <andrey.konovalov@linux.dev> wrote:
> > >
> > > From: Andrey Konovalov <andreyknvl@gmail.com>
> > >
> > > Drop the check on the maximum transfer length in Raw Gadget for both
> > > control and non-control transfers.
> > >
> > > Limiting the transfer length causes a problem with emulating USB devices
> > > whose full configuration descriptor exceeds PAGE_SIZE in length.
> > >
> > > Overall, there does not appear to be any reason to enforce any kind of
> > > transfer length limit on the Raw Gadget side for either control or
> > > non-control transfers, so let's just drop the related check.
> > >
> > > Cc: stable@vger.kernel.org
> > > Fixes: f2c2e717642c ("usb: gadget: add raw-gadget interface")
> > > Signed-off-by: Andrey Konovalov <andreyknvl@gmail.com>
> > > ---
> > >  drivers/usb/gadget/legacy/raw_gadget.c | 2 --
> > >  1 file changed, 2 deletions(-)
> > >
> > > diff --git a/drivers/usb/gadget/legacy/raw_gadget.c b/drivers/usb/gadget/legacy/raw_gadget.c
> > > index 20165e1582d9..b71680c58de6 100644
> > > --- a/drivers/usb/gadget/legacy/raw_gadget.c
> > > +++ b/drivers/usb/gadget/legacy/raw_gadget.c
> > > @@ -667,8 +667,6 @@ static void *raw_alloc_io_data(struct usb_raw_ep_io *io, void __user *ptr,
> > >                 return ERR_PTR(-EINVAL);
> > >         if (!usb_raw_io_flags_valid(io->flags))
> > >                 return ERR_PTR(-EINVAL);
> > > -       if (io->length > PAGE_SIZE)
> > > -               return ERR_PTR(-EINVAL);
> > >         if (get_from_user)
> > >                 data = memdup_user(ptr + sizeof(*io), io->length);
> > >         else {
> > > --
> > > 2.43.0
> > >
> >
> > Hi Greg,
> >
> > Could you pick up this patch?
> >
> > Thank you!
> 
> (Greg to To:)

Can you send it to the proper list again?  I didn't see it on the
linux-usb list as it was never sent there :(

thanks,

greg k-h

  reply	other threads:[~2025-10-21 16:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-04 20:06 [PATCH] usb: raw-gadget: do not limit transfer length andrey.konovalov
2025-09-04 20:07 ` andrey.konovalov
2025-10-21 14:18 ` Andrey Konovalov
2025-10-21 14:19   ` Andrey Konovalov
2025-10-21 16:06     ` Greg Kroah-Hartman [this message]
2025-10-21 22:26       ` Andrey Konovalov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2025102151-footpath-entomb-76da@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=andrey.konovalov@linux.dev \
    --cc=andreyknvl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.