Subject: Re: RelCache (aka ELF prebinding) news
To: Ty Sarna <tsarna@sarna.org>
From: Bang Jun-Young <junyoung@netbsd.org>
List: tech-kern
Date: 12/03/2002 11:29:19
On Mon, Dec 02, 2002 at 06:50:58AM -0500, Ty Sarna wrote:
> > It does not need to be a function of the data because it is never
> > again checked against the data -- it is simply used as a unique identifier.
>
> But it should be able to be regenerated from that data. In other words,
> for any given file, there should be only *one* unique identifier.
>
> > > A random number generator destroys the important property that
> > > identical source run through identical toolchain bits (which should
> > > include prebinding) produce identical files. Violating this property is
> > > a major PITA, especially for testing...
> >
> > You do have a point there. OTOH, timestamps etc. in the ELF files
> > already violate this, as you noted.
>
> No. I did not note that, because it's not true. There are no
> timestamps in our ELF files, except where someone took explicit action
> to put them there (eg, by actually generating source on the fly that
> contains a timestamp, like in kernels).
>
> For example, I just compiled bin/cat from the 1.6 sources. I download
> bin/cat from ftp.netbsd.org and it is identical to mine. There are a
> zillion small ways in which this is useful. Don't screw it up.
(You do have a point ;-)
I agree. Timestamp in ELF binary doesn't seem to be a good idea, either.
Now I'm wondering: is there any 64 bit long checksum available? Or is
it safe to two different 32 bit checksum methods for a single file?
Jun-Young
--
Bang Jun-Young <junyoung@netbsd.org>