From owner-freebsd-arch Sat Jan 9 13:17:14 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA14953 for freebsd-arch-outgoing; Sat, 9 Jan 1999 13:17:14 -0800 (PST) (envelope-from owner-freebsd-arch@FreeBSD.ORG) Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA14948 for ; Sat, 9 Jan 1999 13:17:12 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.1a/8.9.1) with ESMTP id WAA05456 for ; Sat, 9 Jan 1999 22:16:40 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id WAA25195 for freebsd-arch@freebsd.org; Sat, 9 Jan 1999 22:16:39 +0100 (MET) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA18914 for ; Thu, 7 Jan 1999 19:03:19 -0800 (PST) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id TAA23138; Thu, 7 Jan 1999 19:02:16 -0800 (PST) Received: from bubba.whistle.com( 207.76.205.7) by whistle.com via smap (V2.0) id xma023134; Thu, 7 Jan 99 19:01:49 -0800 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id TAA03996; Thu, 7 Jan 1999 19:01:48 -0800 (PST) From: Archie Cobbs Message-Id: <199901080301.TAA03996@bubba.whistle.com> Subject: Re: DEVFS, the time has come... In-Reply-To: <199901051823.LAA13960@harmony.village.org> from Warner Losh at "Jan 5, 99 11:23:29 am" X-To: imp@village.org (Warner Losh) To: arch@FreeBSD.ORG Date: Thu, 7 Jan 1999 19:01:48 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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