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:	Thu, 27 Jan 2011 15:18:47 +0200
From:	"Tanya Brokhman" <tlinder@...eaurora.org>
To:	"'Greg KH'" <greg@...ah.com>
Cc:	<gregkh@...e.de>, <linux-usb@...r.kernel.org>,
	<linux-arm-msm@...r.kernel.org>,
	"'David Brownell'" <dbrownell@...rs.sourceforge.net>,
	<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v4 1/4] usb gadget: Add usb_endpoint_descriptor to be part of the struct usb_ep

> On Thu, Nov 18, 2010 at 02:46:38PM +0200, Tatyana Brokhman wrote:
> > Change usb_ep_enable() prototype to use endpoint descriptor from
> usb_ep.
> > This optimization spares the FDs from saving the endpoint chosen
> > descriptor.
> 
> Why is this a good thing to do?
> 

Because the FDs don't modify the ep descriptor, just pass it through
different functions so there is no need for the FD to save a copy of the
chosen ep descriptor.

> > This optimization is not full though. To fully exploit this
> > change one needs to update all the UDCs as well since in the current
> > implementation each of them saves the endpoint descriptor in it's
> > internal (and extended) endpoint structure.
> 
> Do you do that optimization later on in this patch series?
> 
 
No, we don't because we don't have the ability to test all the UDCs. Right
now the UDCs weren't modified and there is a code duplication. Meaning the
ep descriptor is saved both in the usb_ep structure and in the UDCs internal
ep structure. It's not very "clean" but nothing is broken.

> > +++ b/include/linux/usb/gadget.h
> > @@ -131,20 +131,22 @@ struct usb_ep_ops {
> >   * @maxpacket:The maximum packet size used on this endpoint.  The
> initial
> >   *	value can sometimes be reduced (hardware allowing), according to
> >   *      the endpoint descriptor used to configure the endpoint.
> > - * @driver_data:for use by the gadget driver.  all other fields are
> > - *	read-only to gadget drivers.
> > + * @driver_data:for use by the gadget driver.
> 
> Why did you change the "all other fields..." portion?

Because the FD updates the usb_ep->desc field as well (with the value
returned from ep_choose()).

Sorry for the late response and the bad quoting (the email is a bit old). My
reply was delayed because our intention was to release the UT I mentioned
with the next version but unfortunately getting legal approval is taking
longer than we expected.

Best regards,
Tanya Brokhman
Consultant for Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ