Re: code review request: simple usb stream interface (susi)

Edwin Olson <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
>> * Why does usb-serial set MAX_TRANFER to (PAGE_SIZE - 512)? What's the 
>> 512 for?
>>     
>
> A measure to make sure that a malicious user cannot use up unlimited
> amounts of kernel memory. 512 is the maximum packet size of ehci.
> Thus we make sure the number of packets on the page is an integer.
>   
I definitely understand limiting the number of outstanding URBs to avoid 
a DoS, but I don't follow why MAX_TRANSFER is being set to this 
particular value.   MAX_TRANSFER = PAGE_SIZE would seem like a better 
choice, as it wouldn't cause a PAGE_SIZE-sized write to fragment into 
two URBs (not that that's such a terrible thing anyway.) I'm not sure I 
see how the maximum packet size of the host enters into it.

Can you clarify?

-Ed


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.