From: "Gabriel F. T. Gomes" <gabriel@inconstante.net.br>
To: Florian Weimer <fweimer@redhat.com>
Cc: <libc-alpha@sourceware.org>
Subject: Re: [PATCH] elf: Never use the file ID of the main executable [BZ #24900]
Date: Mon, 23 Sep 2019 14:21:00 -0000 [thread overview]
Message-ID: <20190923112133.0516d23f@tereshkova> (raw)
In-Reply-To: <87pnkxw36k.fsf@oldenburg2.str.redhat.com>
Hi, Florian,
On Thu, 22 Aug 2019, Florian Weimer wrote:
>If the loader is invoked explicitly and loads the main executable,
>it stores the file ID of the main executable in l_file_id. This
>information is not available if the main excutable is loaded by the
>kernel, so this is another case where the two cases differ.
>
>This enhances commit 23d2e5faf0bca6d9b31bef4aa162b95ee64cbfc6
>("elf: Self-dlopen failure with explict loader invocation
>[BZ #24900]").
As we discussed at Cauldron, I had reviewed this patch and noticed that it
changes the place where elf/tst-dlopen-aout fails.
Before this patch, it fails in the test case itself , at:
error: tst-dlopen-aout.c:48: dlopen succeeded unexpectedly: elf/tst-dlopen-aout
After this patch, it fails at:
elf/dl-tls.c: 517: _dl_allocate_tls_init: Assertion `listp != NULL' failed!
which, as you explained to me at Cauldron, is expected and will only be
solved with a sebsequent patch [1]. As you also mentioned to me at
Cauldron, reviewing the second patch is a little tricky, but I'll try to
do it.
[1] https://sourceware.org/ml/libc-alpha/2019-08/msg00625.html
>- /* Get file information. */
>+ /* Get file information. To match the kernel behavior, do not fill
>+ in this information for the executable in case of an explicit
>+ loader invocation. */
> struct r_file_id id;
>+ if (mode & __RTLD_OPENEXEC)
>+ {
>+ assert (nsid == LM_ID_BASE);
>+ memset (&id, 0, sizeof (id));
>+ }
>+ else
>+ {
OK.
I think that this patch does the right thing and could be committed.
Reviewed-by: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com>
Thanks!
prev parent reply other threads:[~2019-09-23 14:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-22 16:55 Florian Weimer
2019-09-23 14:21 ` Gabriel F. T. Gomes [this message]
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=20190923112133.0516d23f@tereshkova \
--to=gabriel@inconstante.net.br \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
/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).