From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <1e962333bab938e179d5ba0113acc7ec@vitanuova.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] an idea From: rog@vitanuova.com In-Reply-To: <05f311ed4273f9fdadc5f3453a807fed@plan9.escet.urjc.es> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Mon, 26 Apr 2004 17:41:25 +0100 Topicbox-Message-UUID: 6e31fb70-eacd-11e9-9e20-41e7f4b1d025 > one way to do it would be to make all 9P servers become network addressable this is not possible in general. one of the beauties of 9p is the fact that it is completely transport independent - just so long as you've got that single channel (whatever it's over), you've got access to the capabilities at the other end. there is not, and neither can there be, a general addressing protocol. hence it makes sense, i think, to have a protocol that can encapsulate the idea of introducing new users *within* a namespace. > A regular /dev (or whatever) directory with > one mounted file|dir per device would be cleaner. Instead of doing the > #s trick, newns() could return not a clean namespace, but one with > devices installed. To do sandboxing one could unmount from there whatever > is not wanted. how would newns() (which is not a system call) get access to those devices? and if a process is in a sandbox, what's to stop it doing a newns() and getting access to those devices anyway. the srv device idea is to let the available devices percolate down from the top level. there's no way to access a device to which one has not been granted access. > This is one thing that I dislike even with the way things work today. But > it would probably require changing many interfaces. i think it's actually relatively straightforward to change this. i don't believe this capability is used in many places, and the number of kernel devices that use it is limited. a simple capability scheme should do the job. > BTW, I don't see why you would need this: > > > the implementation would be straightforward (main kernel change would > > be having a Dev* inside a Chan rather than indirecting through > > devtab), and it doesn't change 9p. almost all user-level code would > > be unaffected. > > Is it to proxy for a remote dev? you're right, i don't think it is necessary. i'd thought it was required due to the way that some kernel devices (in particular the srv device) would "gateway" through to other kernel devices. i think the current interface is almost sufficient (depending on what kind of authentication might be required by kernel devices).