[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: prelink cron script



Jack Howarth wrote:
> prelink is a program which modifies ELF shared libraries and ELF dynam-
> ically linked binaries, so that the time which dynamic linker needs for
> their relocation at startup significantly decreases

A nice goal I'm sure, but actually modifying binaries will probably give
systems like aide and tripwire fits.

> cially number of unshareable pages).  Such  prelinking  information  is
> only  used  if  all its dependant libraries have not changed since pre-
> linking, otherwise programs are relocated normally.

So I suppose that running the pelink program at package build time is
out since at the next rev of libc or whatever all the prelinking
information would be useless and the speedup would be lost.

> One can prelink a set of directories as defined in /etc/prelink.conf
> but that process is rather slow. Redhat is considering using a cron
> script approach to check for new files however with the amount of
> churn in sid we have that isn't probably the best choice for us.
> Redhat has also added postinst prelink scripts to some of their rpms.
> Hoever as prelink is pretty system level, it seems to me more appropriate
> to just let the user toggle autoprelink on for his machine and then
> have both apt-get and dkpg prelink all of these binaries and libs
> at install time.

I think we will need to let this be user-controllable due to the
tripwire issue not to mention read-only /usr and so on. It could be
implemented as an apt post-invoke hook (since dpkg doesn't have hooks
yet). Such a hook would have to search out new libraries and binaries on
its own though, since apt cannot currently pass information about what
packages have changed to its post-invoke hook. 

Or it could just be done as a cron job that looks at binary mtimes.
Make the cron job operate on a user-configurable set of directories that
includes $PATH and everything in ld.so.conf by default. Caching the
mtimes would be a bit of a pain for sure. How slow is this prelinking if
every binary on the system is prelinked?

It seems that the only advantage a post-invoke hook would have over a
cron job, given the current interfaces, is it would be able to run
immediatly after most upgrades.

-- 
see shy jo

Attachment: pgpGnp8PDxPR_.pgp
Description: PGP signature


Reply to: