Re: binary format loader cache?

Theodore Y. Ts'o (tytso@MIT.EDU)
Tue, 8 Apr 1997 10:36:29 -0400


Date: Mon, 7 Apr 1997 22:38:14 +0200 (MET DST)
From: Ingo Molnar <mingo@pc5829.hil.siemens.at>

the point is that we dont move /bin/ld.so or /bin/bash around too often,
and we do not modify them. Still we do a lookup for every binary format
loading currently. I know it's complex, as an inode's name depends on many
things like the path directory list leading up to the inode, and we have
to maintain exact matching between the binary loader name (which is
contained in the to-be-run executable), and the inode that is (or should
be) behind it. Plus there might be user-dependent things, like one user
not being able to run a binary loader, while the other one can run it ...

I wouldn't do it for /bin/bash, but it's probably safe to do it for
/bin/ld.so. I'd probably just simply cache the inode, and do simple
checks to make sure it still exists, and have the kernel re-evaluate all
of the cached inodes if the system administrator touchs /proc/rehash.

Yes, yes, it's gross. It's probably not worth doing for /bin/bash, but
it probably *is* worth doing for /bin/ld.so.....

- Ted