Subject: Re: code to store the path of the executable in struct proc...
To: Jason Thorpe <>
From: Darren Reed <>
List: tech-kern
Date: 09/26/2007 22:31:02
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?