Subject: Re: code to store the path of the executable in struct proc...
To: Darren Reed <darrenr@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-kern
Date: 09/27/2007 10:07:24
On Sep 26, 10:31pm, darrenr@netbsd.org (Darren Reed) wrote:
-- Subject: Re: code to store the path of the executable in struct proc...

| Jason Thorpe wrote:
| >
| > On Sep 20, 2007, at 5:14 PM, Andrew Doran wrote:
| >
| >> The reverse mapping makes me uncomfortable. For MP the namecache 
| >> needs to be
| >> simple because it's one item of shared state that gets hammered on. 
| >> Is it
| >> possible to get the path at exec time?
| >
| > I've been thinking of rewriting the name cache.  The changes I have in 
| > mind would allow you to always get the path for a file.
| 
| Would you be exporting this out of the kernel so that the likes of
| fstat(1) can retrieve it?  If you could, this would be a huge win and
| save a lot of using find to search for inodes...
| 
| I'll mention one caveat here - on multiuser systems, there is some
| amount of privacy (I repeat, *some amount of privacy*) from the
| filenames themselves being hidden from fstat(1).  If you could
| export the names out, would the filenames be exposed to all?
| 
| And since you've mentioned other platforms, what do they do
| about/with this information?

OS/X has completely broken the directory security model by directly
exposing the inodes of each mount as a filesystem.

christos