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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+O4pCKbJCtF53jUBvQMX+zgPZ=YxCwGHyP-8JMx=++d5sCiCA@mail.gmail.com>
Date:	Sat, 15 Oct 2011 13:45:27 +0200
From:	Markus Rechberger <mrechberger@...il.com>
To:	Johannes Stezenbach <js@...21.net>
Cc:	Alan Stern <stern@...land.harvard.edu>, Greg KH <gregkh@...e.de>,
	USB list <linux-usb@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [Patch] Increase USBFS Bulk Transfer size

On Sat, Oct 15, 2011 at 12:45 AM, Johannes Stezenbach <js@...21.net> wrote:
> On Fri, Oct 14, 2011 at 04:19:34PM -0400, Alan Stern wrote:
>> On Fri, 14 Oct 2011, Johannes Stezenbach wrote:
>>
>> > I don't really want to help Markus with his proprietary, binary-only
>> > userspace driver crap, but I wonder why nobody seems to remember
>> > how the USB protocol works on the wire?
>>
>> I remember it perfectly well.
>
> My bad, I'm sorry for hitting the wrong tone.
>
> What I meant to say is Markus' statement that the device only
> works at a certain transfer size cannot be true since
> this size is not visible to the device via the USB bus.
>

The log files and demonstration video say something different. Plus
the same happens with MacOSX. And
Windows is using the same. So that means that something has been
overlooked so far.
The "off-by-one error" must be caused by something. In practice it
doesn't seem to be relevant as all
other USB stacks can handle this.

>> > Apparently the device can only handle fixed size packets
>> > of either 188 or 2*188 byte, thus it breaks with 12288 or 11776.
>>
>> No.  The device expects 512-byte packets because it uses a bulk
>> endpoint.
>>
>> > The endpoint's wMaxPacketSize might reflect this.
>>
>> For high-speed devices, a bulk endpoint's wMaxPacketSize must always be
>> 512.
>
> OK, after re-reading the USB spec I see you are right
> and I stand corrected.
>
>> > I guess a transfer size of e.g. 188*60=11280 would work.
>> > See the first mail of this thread.
>>
>> According to Markus, with this particular device nothing but 24064
>> works.  The discussion is a little difficult to follow because he
>> talked about two different devices without always being clear about
>> which was which.
>
> If you queue two URBs, one 12288 and 11776 bytes, the device
> does not see any difference to one URB with 24064.  It's just not
> in the USB wire protocol.  It would make a difference if the
> device violated the spec and sent 188 byte packets. However, the
> spec says a short packet terminates the transfer.  But I wonder
> if this is really the case?
>

I can send a sample device in around one month to Alan so he can have a look
at it with the bus analyzer. However I would be happy to see Alan's
proposal about the
16 MB limitations included since that one also solves the issue and even USB 3.0
would benefit from this as it seems.

BR,
Markus
--
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