From owner-freebsd-arch Tue Nov 27 3:41:42 2001 Delivered-To: freebsd-arch@freebsd.org Received: from tao.org.uk (genius.tao.org.uk [212.135.162.51]) by hub.freebsd.org (Postfix) with ESMTP id 82BFB37B416 for ; Tue, 27 Nov 2001 03:41:39 -0800 (PST) Received: by tao.org.uk (Postfix, from userid 100) id 30DE737C; Tue, 27 Nov 2001 11:41:33 +0000 (GMT) Date: Tue, 27 Nov 2001 11:41:33 +0000 From: Josef Karthauser To: Garrett Wollman Cc: mjacob@feral.com, arch@FreeBSD.org Subject: Re: Anybody working on devd? Message-ID: <20011127114133.S643@tao.org.uk> References: <20011126212937.AD31B380D@overcee.netplex.com.au> <20011126230600$59b3@traf.lcs.mit.edu> <200111270325.fAR3P6e25466@khavrinen.lcs.mit.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="TOcFo/l1T3s1H/TJ" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200111270325.fAR3P6e25466@khavrinen.lcs.mit.edu>; from wollman@khavrinen.lcs.mit.edu on Mon, Nov 26, 2001 at 10:25:06PM -0500 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --TOcFo/l1T3s1H/TJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 26, 2001 at 10:25:06PM -0500, Garrett Wollman wrote: > In article <20011126230600$59b3@traf.lcs.mit.edu> you write: >=20 > >It seems to me wrong to do 'adjustments'. Either you have a model that t= rusts > >drivers to do the right thing when the call make_dev, or you don't. >=20 > My site policy about what permissions certain device nodes should have > should not, and in some cases probably cannot, be written directly > into a device driver. The driver should use the most conservative > possible settings -- in most cases, root:wheel/600 -- and let > user-land code apply whatever policy is desired. We already have > mechanisms for expressing some of that policy (e.g., /etc/fbtab) but > it's not cognizant of transient devices. That's part of the problem > which needs to be solved. Devices that come and go can come and go quickly. For instance a USB sync'd palmpilot only appears as a usb device once the hotsync button has been pressed, and disappears once the sync process has finished. A userland process that wants to sync has to wait until it sees the usb device node appear to know that it is there (unless usbd can fire the process off at enumeration time). If a userland process pokes with the node permissions sometime after the device node appears, there's a race between the application and the userland devd. Sometimes the sync will succeed, sometimes it will fail due to wrong dev node permissions. For this reason I'd prefer the devnode to be created with the right permissions in the first place. Phk was talking about loading user/group policies into the kernel so that make_dev can use them whilst creating the node. Joe --TOcFo/l1T3s1H/TJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjwDe+wACgkQXVIcjOaxUBb/uACgvQ+Mi481V5gr3ZguLE+uZJds 9esAnjJbFGG5K6qsiokduaZhbayVJ6rW =IYWY -----END PGP SIGNATURE----- --TOcFo/l1T3s1H/TJ-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message