This is the mail archive of the libc-alpha@sourceware.org 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]

[PATCH v2 0/3] elf: Allow dlopen of filter object to work [BZ #16272]


This series fixes up the patchset for the comments raised so far.
Patches 2 and 3 are unchanged.

v2:
 - code formatting fixups
 - add dependency of test output on filtee library
 - tests changed to use the test framework

The main outstanding question is whether it is valid to use l_initfini
to do the relocations, or whether we need to stick to following
new->l_next (and new->l_prev). I'm reasonably confident that
l_initfini contains all the objects in new->l_next. See
https://sourceware.org/ml/libc-alpha/2019-10/msg00659.html

The majority of the discussion on this series has been around how
filter objects are specified, and the alternatives to using filter
objects. The most persuasive is to use a version_script to specify the
ABI in the link library (.so), and setup the soname symlink (.so.1) to
point to the filtee. This relies on:

* library versioning being used.

* dlopen() calls must use the soname.

* if there are multiple implementors, they need to be consistent in
  versioning the library.

I think these are reasonable requirements, though may be difficult to
ensure in the field.

Independent of the alternatives, I'd still like to advocate fixing
dlopen for filter objects. glibc currently works (with various
provisos) with filter objects when the application is linked against
one. Not being able to work with the same library via dlopen is
unexpected.

David Kilroy (3):
  elf: Allow dlopen of filter object to work [BZ #16272]
  elf: avoid redundant sort in dlopen
  elf: avoid stack allocation in dl_open_worker

 elf/Makefile               | 13 +++++++++++--
 elf/dl-deps.c              | 35 ++++++++++++++++++++++++++---------
 elf/dl-open.c              | 32 +++++++++++++++-----------------
 elf/tst-filterobj-dlopen.c | 39 +++++++++++++++++++++++++++++++++++++++
 elf/tst-filterobj-flt.c    | 24 ++++++++++++++++++++++++
 elf/tst-filterobj-lib.c    | 24 ++++++++++++++++++++++++
 elf/tst-filterobj-lib.h    | 18 ++++++++++++++++++
 elf/tst-filterobj.c        | 36 ++++++++++++++++++++++++++++++++++++
 8 files changed, 193 insertions(+), 28 deletions(-)
 create mode 100644 elf/tst-filterobj-dlopen.c
 create mode 100644 elf/tst-filterobj-flt.c
 create mode 100644 elf/tst-filterobj-lib.c
 create mode 100644 elf/tst-filterobj-lib.h
 create mode 100644 elf/tst-filterobj.c

-- 
2.7.4


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