public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] elf: Allow dlopen of filter object to work [BZ #16272]
@ 2019-10-24 10:34 David Kilroy
  2019-10-24 10:34 ` [PATCH v2 2/3] elf: avoid redundant sort in dlopen David Kilroy
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: David Kilroy @ 2019-10-24 10:34 UTC (permalink / raw)
  To: libc-alpha; +Cc: nd

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-11-15 17:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-24 10:34 [PATCH v2 0/3] elf: Allow dlopen of filter object to work [BZ #16272] David Kilroy
2019-10-24 10:34 ` [PATCH v2 2/3] elf: avoid redundant sort in dlopen David Kilroy
2019-10-24 10:34 ` [PATCH v2 3/3] elf: avoid stack allocation in dl_open_worker David Kilroy
2019-10-24 10:34 ` [PATCH v2 1/3] elf: Allow dlopen of filter object to work [BZ #16272] David Kilroy
2019-11-06 16:03 ` [PATCH v2 0/3] " David Kilroy
2019-11-15 17:31   ` David Kilroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).