Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jan 1999 19:01:48 -0800 (PST)
From:      Archie Cobbs <archie@whistle.com>
To:        arch@FreeBSD.ORG
Subject:   Re: DEVFS, the time has come...
Message-ID:  <199901080301.TAA03996@bubba.whistle.com>
In-Reply-To: <199901051823.LAA13960@harmony.village.org> from Warner Losh at "Jan 5, 99 11:23:29 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Warner Losh writes:
> To recap the design for devfsd and what it requires of devfs:
> 	(1) devfsd will start by chmod/chown/chgrp the nodes it finds in
> 		its database.  Otherwise it will exec a default script
> 		with one arg to get the node to have the right
> 		permissions.
> 	(2) devfsd will wakeup when a poll fires.[*]
> 	(3) devfsd will scan the tree, doing its thing ala startup,
> 		skipping those nodes that aren't new or changed.
> 
> 	(1) devfs will honor chown, chgrp, chmod, symbolic links and
> 		mkdir.
> 	(2) devfs will cause the poll to fire[*] when one of these events
> 		happens.
> 
> Nothing else.  No sysctls are used.  No device classes are needed (but
> could be implemented if someone wanted to do so).

That sounds good to me. If routed talks to the kernel via the
routing socket, and syslogd listens to the kernel via the syslog
device..  then in the same way, devfsd could talk to the kernel
via /dev/devfs (or whatever, that's an implementation detail). Then
we just need to design the (hopefully very simple) protocol.

To avoid the security race window of having a device appear with
default permissions for a while before devfsd can get around to
chmod'ing it, devfs could query devfsd via this /dev/devfs connection
for the initial permissions before creating the directory entry,
etc.

Other tricks useful in a chroot() jail could be done, e.g., devfsd
tells devfs to *not* create an entry for a newly inserted PC card
so the chroot() prisoner can't access it, etc.

In the case that no process has /dev/devfs open, devfs just does
it's normal "default" thing.

I'm very glad we all agree that persistence should be handled *out*
of the kernel :-)

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901080301.TAA03996>