This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] ppc64 LD_PRELOAD tolerance

Note that it should already be the case that for it
will search the usual path and skip non-matching libraries (just as is done
for normal library dependencies).  Your change only affects libraries given
by explicit file name.  For preload libraries made available by
system-installed packages, using the unadorned name is the simplest thing.
If no library of any flavor (/lib64 or /lib) is available, you will get an

Your approach is not what we consider a safe solution.  When a user has
specified LD_PRELOAD they are expecting a certain effect on the behavior of
the programs they run, and there are all kinds of errors or security issues
that could be introduced by silently violating those assumptions--there is
no way to know how much the preloads might matter to the particular use.

If there is no 64-bit version of the preload module available, then having
64-bit programs silently ignore their setting and behave as they are used
to 32-bit programs behaving only without their preload, is not what users
are expecting.

However inconvenient and aggravating, a clear error message that doesn't
permit you to proceed with configuration that cannot do what you've asked
for is safer than silently doing what you might possibly have wanted (but
could very well have thought you'd specified to be impossible).  

For specifying preloads by explicit file name, so as to use ones not in the
standard search path or avoid searching for some reason, what seems most
useful is a way to specify you want split 32/64-bit variants so that one
LD_PRELOAD setting can work for both 32-bit and 64-bit programs (as
e.g. one LD_LIBRARY_PATH setting will work because of the skipping behavior).
I've added (not checked in yet) a simple feature for this in the form of a new
dynamic string tag $LIB that expands to either "lib" or "lib64".  So you can
use LD_PRELOAD='/$LIB/' or LD_PRELOAD='/my/foo${LIB}.so' to find
/lib64/ or /lib/ and /my/ or /my/

How does that grab you?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]