From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 13 Jul 2009 14:42:20 -1000 From: Tim Newsham To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-Reply-To: <13426df10907131616k203f0676yb181157cac24d179@mail.gmail.com> Message-ID: References: <0F3972F5-D44B-4231-97FA-C6CE871B032B@gmail.com> <140e7ec30907130124g1a0e4c90m6d83a08516d95463@mail.gmail.com> <3aaafc130907131518y74523ef8rf9ddb92fb3d3d105@mail.gmail.com> <13426df10907131616k203f0676yb181157cac24d179@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: [9fans] v9fs question Topicbox-Message-UUID: 1e42c1be-ead5-11e9-9d60-3106f5b1d025 > Could we solve this by making private mounts the default (or only > allowed) behavior? I've wondered if there's enough context information that the fs driver could "fake" per-process mount points directly. For example, I mount v9fs on /n. Initially I have no remote mounts in there, but I have /n/ctl. I echo "mount 1.2.3.4 foo" to /n/ctl and now I have /n/foo which is served from 1.2.3.4 for my process, but other processes dont see /n/foo. I fork a child and it gets /n/foo, too. In the child I mount another directory and the changes are seen in both the child and the parent. I then echo "copyns" to /n/ctl and then perform another mount and the new mount is visible in the child process but not the parent process. This would of course require that the kernel filesystem (probably vfs layer) could distinguish who made a filesystem request. It might also require some hackery to get the inheritance on fork working properly (although perhaps some existing unix mechanism could be reused for this purpose, such as session and process group stuff). Feasible at all in Linux? *BSD? Win32? Upsides: Kernel doesnt need to otherwise support any notion of mount namespace. Removes security concerns of per-process namespaces since you could never rebind over /etc/passwd or other important files. Downsides: Perhaps not possible. Mount/bind namespaces not universally present, only within certain mount points. > ron Tim Newsham http://www.thenewsh.com/~newsham/