Messages in this thread | | | Date | Sun, 21 Sep 2014 14:42:46 +0200 | From | Dominik Paulus <> | Subject | Re: [PATCH 03/18] usbip: Add kernel support for client ACLs |
| |
On Sun, Sep 21, 2014 at 02:44:33AM +0200, Max Vozeler wrote: > Hi, > > On Tue, Sep 16, 2014 at 11:38:40PM +0000, Maximilian Eschenbacher wrote: > > From: Dominik Paulus <dominik.paulus@fau.de> > > > > This patch adds the possibility to stored ACLs for allowed clients for > > each stub device in sysfs. It adds a new sysfs entry called "usbip_acl" > > for each stub device, containing a list of CIDR masks of allowed > > clients. This file will be used by usbip and usbipd to store the ACL. > > Is there a need to involve the kernel here, couldn't usbip and usbipd > apply the ACLs during connection setup in userspace?
In fact, they do, sysfs is just used for storing the ACLs. They are never interpreted by the kernel. Admittedly, this isn't great design, but currently, the ACLs are specified when binding a device to usbip using the "usbip bind" utility and interpreted by usbipd when a connection attempt is made. usbip (configuration utility) and usbipd (userspace daemon) don't communicate in userspace at all, and moving the ACLs out of kernel would be considerably more code and more error prone.
Regards, Dominik
| |