From: David Kilroy <David.Kilroy@arm.com>
To: "libc-alpha@sourceware.org" <libc-alpha@sourceware.org>,
David Kilroy <David.Kilroy@arm.com>
Cc: nd <nd@arm.com>
Subject: RE: [PATCH v2 0/3] elf: Allow dlopen of filter object to work [BZ #16272]
Date: Wed, 06 Nov 2019 16:03:00 -0000 [thread overview]
Message-ID: <AM0PR08MB4068674C2BB5E298FD27288A91790@AM0PR08MB4068.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <cover.1571755115.git.david.kilroy@arm.com>
Hi,
Ping. Just checking what the general feeling is about this patchset.
If it helps, I've locally tested a version which scans backwards through
new->l_prev and constructs map from the earliest non-relocated object (instead
of the current object). This passes the test. Would this version be preferred?
Thanks,
Dave.
Note: for the test case the walk of ->l_prev hits:
elf/tst-filterobj-lib.so
elf/ld-linux-x86-64.so.2
libc.so.6
dlfcn/libdl.so.2
linux-vdso.1
"" <- an object that doesn't have a ->l_name
> -----Original Message-----
> From: libc-alpha-owner at sourceware dot org <libc-alpha-owner at
> sourceware dot org> On Behalf Of David Kilroy
> Sent: 24 October 2019 11:34
> To: libc-alpha at sourceware dot org
> Cc: nd <nd at arm dot com>
> Subject: [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
next prev parent reply other threads:[~2019-11-06 16:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-24 10:34 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 ` David Kilroy [this message]
2019-11-15 17:31 ` [PATCH v2 0/3] " David Kilroy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM0PR08MB4068674C2BB5E298FD27288A91790@AM0PR08MB4068.eurprd08.prod.outlook.com \
--to=david.kilroy@arm.com \
--cc=libc-alpha@sourceware.org \
--cc=nd@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).