aboutsummaryrefslogtreecommitdiff
path: root/tools/usb/usbip/src
AgeCommit message (Collapse)AuthorFilesLines
2016-11-07usbip: deletion of incorrect socket descriptor checkingNobuo Iwata1-7/+0
This patch removes checking of socket descriptor value in daemons. It was checked to be less than FD_SETSIZE(1024 usually) but it's not correct. To be exact, the maximum value of descriptor comes from rlimit(RLIMIT_NOFILE). Following kernel code determines the value : get_unused_fd_flags() : fs/files.c __alloc_fd() : fs/files.c expand_files() : fs/files.c The defalut (soft limit) is defines as INR_OPEN_CUR(1024) in include/linux/fs.h which is referenced form INIT_RLIMS in include/asm-generic/resource.h. The value may be modified with ulimt, sysctl, security configuration and etc. With the kernel code above, when socket() system call returns positive value, the value must be within rlimit(RLIMIT_NOFILE). No extra checking is needed when socket() returns positive. Without 'usbip: vhci number of ports extension' patch set, there's no practical problem because of number of USB port restriction. With the patch set, the value of socket descriptor can exceed FD_SETSIZE(1024 usually) if the rlimit is changed. Signed-off-by: Nobuo Iwata <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-05-03usbip: adding names db to port operationNobuo Iwata1-2/+11
Adding names database to port command. BEFORE) 'unknown' for vendor and product string. Imported USB devices ==================== Port 00: <Port in Use> at Low Speed(1.5Mbps) unknown vendor : unknown product (03f0:0224) 3-1 -> usbip://10.0.2.15:3240/5-1 -> remote bus/dev 005/002 AFTER) Most vendor string will be converted. Imported USB devices ==================== Port 00: <Port in Use> at Low Speed(1.5Mbps) Hewlett-Packard : unknown product (03f0:0224) 3-1 -> usbip://10.0.2.15:3240/5-1 -> remote bus/dev 005/002 Signed-off-by: Nobuo Iwata <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-04-26usbip: tools: Start using VUDC backend in usbip toolsIgor Kotrasinski3-6/+112
Modify userspace tools to allow exporting and connecting to vudc. This commit is a result of cooperation between Samsung R&D Institute Poland and Open Operating Systems Student Society at University of Warsaw (O2S3@UW) consisting of: Igor Kotrasinski <[email protected]> Karol Kosik <[email protected]> Ewelina Kosmider <[email protected]> Dawid Lazarczyk <[email protected]> Piotr Szulc <[email protected]> Tutor and project owner: Krzysztof Opasiak <[email protected]> Signed-off-by: Igor Kotrasinski <[email protected]> Signed-off-by: Ewelina Kosmider <[email protected]> [Various bug fixes and improvements] Signed-off-by: Krzysztof Opasiak <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-04-26usbip: tools: Extract generic code to be shared with vudc backendKrzysztof Opasiak1-13/+17
Extract the code from current stub driver backend and a common interface for both stub driver and vudc. This allows to share most of the usbipd code for both of them. Based on code created in cooperation with Open Operating Systems Student Society at University of Warsaw (O2S3@UW) consisting of: Igor Kotrasinski <[email protected]> Karol Kosik <[email protected]> Ewelina Kosmider <[email protected]> Dawid Lazarczyk <[email protected]> Piotr Szulc <[email protected]> Tutor and project owner: Krzysztof Opasiak <[email protected]> Signed-off-by: Krzysztof Opasiak <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-22tools: usbip: detach: avoid calling strlen() at each iterationEric Curtin1-1/+3
Instead of calling strlen on every iteration of the for loop, just call it once and cache the result in a temporary local variable which will be used in the for loop instead. Signed-off-by: Eric Curtin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-12-02usbip: remove unneeded structureJulia Lawall1-2/+0
Delete a local structure that is only used to be initialized by memset. A semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier x,i; @@ { ... when any -struct i x; <+... when != x - memset(&x,...); ...+> } // </smpl> Signed-off-by: Julia Lawall <[email protected]> Acked-by: Valentina Manea <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-08-25usbip: move usbip userspace code out of stagingValentina Manea14-0/+2542
At this point, USB/IP userspace code is fully functional and can be moved out of staging. Signed-off-by: Valentina Manea <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>