On 01/13/2017 01:17 AM, Shuah Khan wrote: > On 12/26/2016 12:08 AM, Nobuo Iwata wrote: >> This patch adds function and usage of new connect operation, disconnect >> operation and application(vhci)-side daemon to README and manuals. > > This should be the first patch for the series. That would have saved > me lot of time. Please move this patch up. > >> >> At this point, the wording, 'server' and 'client' are ambiguous in >> several place. >> >> For existing attach command, the daemon runs device side machine and >> attach command is executed in application side machine. Then 'server' >> is used for device side and 'client' is for application side. >> >> For the new connect command, the daemon runs applications side machine >> and connect command is executed in device side machine. Now, 'server' >> and 'client' run in different machine than before. >> >> To avoid confusion, to represent things to be done in device side node >> by both command and daemon, words 'device-side' is used instead of >> 'server'. To represent things to be done is application side node by >> both command and daemon, 'applicationr-side' are used instead of >> 'client'. >> >> EXISTING) - invites devices from application(vhci)-side >> +------+ +------------------+ >> device--+ STUB | | application/VHCI | >> +------+ +------------------+ >> (server) (client) >> 1) # usbipd ... start daemon >> = = = >> 2) # usbip list --local >> 3) # usbip bind >> <--- list bound devices --- 4) # usbip list --remote >> <--- import a device ------ 5) # usbip attach >> = = = >> X disconnected 6) # usbip detach >> 7) usbip unbind >> >> NEW) - dedicates devices from device(stub)-side >> +------+ +------------------+ >> device--+ STUB | | application/VHCI | >> +------+ +------------------+ >> (client) (server) >> 1) # usbipa ... start daemon > > Make the left side server and right side client. I think you might be > using server and client network terminology. I would like to see server > as the system that has the device physically attached to. > > > I still want to see server as the one that is connected to the device. > It is just that in this new proposed model, server is exporting devices. > > Also does usbip run here in user mode. Can any user run uspip and initiate > export? If so, I don't think I can take this patch series. I don't like to > see non root being able to export and/or make attached devices public. > usbip connect (export operation) needs the same permissions as usbip bind because it uses the same kernel infrastructure. To export a device you need to bind a stub driver to it which you do using bind attribute in drivers directory which by default has permissions: --w------- 1 root root 4096 Dec 31 17:12 bind usbipa also has to run as a root to accept device which someone would like to system because it writes to attach attribute in vhci driver dir which is declared as follows: static DEVICE_ATTR(attach, S_IWUSR, NULL, store_attach); So summing up to export or to accept export on usbipa side both sides requires root permissions. Best regards, -- Krzysztof Opasiak Samsung R&D Institute Poland Samsung Electronics -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html