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] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 08 Nov 2013 13:23:32 +0100
From:	Michal Nazarewicz <mina86@...a86.com>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	David Cohen <david.a.cohen@...ux.intel.com>,
	Felipe Balbi <balbi@...com>, gregkh@...uxfoundation.org,
	USB list <linux-usb@...r.kernel.org>,
	Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 3/4] usb: ffs: check quirk to pad epout buf size when not aligned to maxpacketsize

On Thu, Nov 07 2013, Alan Stern wrote:
> What happens if the userspace daemon writes to epfile but the host 
> changes the config or altsetting before all the data can be sent?  Does 
> the remaining data get flushed?

Each read and write is mapped to a single request, so the usual.

> I'm still a little unclear on this.  Disabling the function ought to
> have much the same effect as changing the config or altsetting: Writes
> to endpoint files should be flushed and reads should be terminated.  
> Otherwise you would end up sending stale data to the host or reading 
> data that the daemon isn't prepared for.

You may have a point here.  I'll try to prepare a patch over the weekend.

> Given that, there doesn't seem to be any need for a loop.  Copy the 
> data; if the function was disabled in the meantime then throw away the 
> data and return an appropriate error code.

Right.

> I don't see any reason why you should ever have to copy the same data 
> from userspace multiple times.

That actually never happens.  The data is copied at most once.

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +--<mpn@...gle.com>--<xmpp:mina86@...ber.org>--ooO--(_)--Ooo--


Download attachment "signature.asc" of type "application/pgp-signature" (836 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ