Brad Knowles wrote: > At 10:31 PM -0700 2003/05/25, Marcel Moolenaar wrote: > > Hence, prebind information is decoupled from the executable. One > > of the more obvious complexities is the fact that the naming scheme > > is such that multiple binaries can have the same prebind cache file. > > The collision is currently not handled, other than making sure that > > the prebind information for binary A1 is not used by binary A2. But > > other complexities exist. What if by some unlucky draw of faith you > > have two totally independent executables that both resolve to the > > same prebind file *and* happen to have the same build ID? You have > > an undetectable collision. > > How painful would it be to do a checksum (ideally, MD5 hash) of > the binary in question? Or at least recording path to the binary > within the prebind cache file? Or maybe file metadata like the > ownership, permissions, and date/time stamp? A hash is a bad idea. To check it, you would have to read all the pages, and lose your speed win from the pre-binding. 8-). Much better to use the inode number, device ID, and timestamp (the first two to verify a matching file, the last to reset the cache, should the file change). Personally, I prefer putting the information in an ELF section in the file itself; you're going to have a hell of a time with removing stale cache entries, without any tight coupling of what is, essentially, metadata. -- TerryReceived on Mon May 26 2003 - 00:16:44 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:09 UTC