required/suggested devfs userland tool functionality

Alex ahornung at gmail.com
Mon Jul 6 08:25:01 PDT 2009


Hi,

as I soon want to start with the userland tool for devfs, I would like
to hear some thoughts on what userland functionality is needed for
devfs.

While my original intentions were to also replace the current devd, I
don't see the need for it, neither do I think it's appropriate as it
for example can execute commands for devices that nobody ( as in: no
driver ) attached to, which is something devfs won't be able to do.

So what is left for devfs userland tool to do is to apply certain
permissions/rules to devices that are created. I currently see two
solutions to this:

1) notify the userland tool of every single device attach/detach and
give it some time to answer with a set of permissions for the newly
created device. This approach requires running the devfs userland tool
as a daemon, with one instance per devfs mount point. This has the
advantage that rules could be kept in userspace.

2) let the userland tool load a whole set of rules (for each devfs
mount point) into the kernel. In turn the kernel applies the set of
rules every time a device is attached. This has several advantages:
- userland wouldn't have to be asked for every device attach
- rules would continue to be applied even if the userland tool isn't running
- for that same reason, userland tool wouldn't have to be a daemon.

While I prefer the second approach, I would like to hear your thoughts
about this before making a final decision on which one to use. I'd
also welcome suggestions of other things you think the userland devfs
tool should be able to do.


Cheers,
Alex Hornung





More information about the Users mailing list