[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <65e6931b2a15e4685eb0c3b7873a197ba025d50d.camel@gmail.com>
Date: Wed, 31 Mar 2021 16:23:07 +0500
From: Muhammad Usama Anjum <musamaanjum@...il.com>
To: Shuah Khan <skhan@...uxfoundation.org>, shuah@...nel.org,
gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org, valentina.manea.m@...il.com,
stern@...land.harvard.edu
Cc: musamaanjum@...il.com
Subject: Re: [PATCH] usbip: vhci_hcd: do proper error handling
On Fri, 2021-03-26 at 14:24 -0600, Shuah Khan wrote:
> On 3/25/21 5:46 AM, Muhammad Usama Anjum wrote:
> > The driver was assuming that all the parameters would be valid. But it
> > is possible that parameters are sent from userspace. For those cases,
> > appropriate error checks have been added.
> >
>
> Are you sure this change is necessary for vhci_hcd? Is there a
> scenario where vhci_hcd will receive these values from userspace?
I'm not sure if these changes are necessary for vhci_hcd. I'd sent
this patch following the motivation of a patch (c318840fb2) from
dummy_hcd to handle some cases. Yeah, there is scenario where vhci_hcd
will receive these values from userspace. For example, typReq =
SetPortFeature and wValue = USB_PORT_FEAT_C_CONNECTION can be received
from userspace. As USB_PORT_FEAT_C_CONNECTION case isn't being
handled, default case will is executed for it. So I'm assuming
USB_PORT_FEAT_C_CONNECTION isn't supported and default case shouldn't
be executed.
> Is there a way to reproduce the problem?
I'm not able to reproduce any problem. But typReq = SetPortFeature and
wValue = USB_PORT_FEAT_C_CONNECTION may trigger some behavior which
isn't intended as USB_PORT_FEAT_C_CONNECTION may not be supported for
vhci_hcd.
> thanks,
> -- Shuah
There is one line wrong in this patch. If we decide to proceed, I'll
send a v2. Please let me know your thoughts.
Thanks,
Usama
Powered by blists - more mailing lists