From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: PATCH: dl_iterate_phdr()
Date: Thu, 11 Oct 2012 20:00:34 -0400 [thread overview]
Message-ID: <20121012000034.GC254@brightrain.aerifal.cx> (raw)
In-Reply-To: <20121011234255.GB254@brightrain.aerifal.cx>
On Thu, Oct 11, 2012 at 07:42:55PM -0400, Rich Felker wrote:
> Otherwise, looks okay!
Actually one more issue -- it needs to be made thread-safe. This would
just be a matter of obtaining a read-lock on the dynamic linker lock,
except that this lock should not be held during callbacks to
application code, which need not return in bounded time. Instead, I
think it would work to read the global "tail" while a read-lock is
held, then use a loop of the form:
for (current=head; ; current=current->next) {
...
if (current == saved_tail) break;
}
This will simply skip any new libraries that were not (fully) loaded
yet at the time of the call to dl_iterate_phdr.
Rich
next prev parent reply other threads:[~2012-10-12 0:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-11 14:29 Alex Caudill
2012-10-11 23:42 ` Rich Felker
2012-10-12 0:00 ` Rich Felker [this message]
2012-10-12 13:28 ` Alex Caudill
2012-10-12 15:43 ` Rich Felker
2012-10-13 1:04 ` Alex Caudill
2012-10-13 1:24 ` Alex Caudill
2012-10-13 1:31 ` Rich Felker
2012-10-15 3:30 ` Rich Felker
2012-10-15 4:47 ` Alex Caudill
2012-10-15 12:41 ` Rich Felker
2012-10-18 20:45 ` Rich Felker
2012-10-31 18:35 ` Alex Caudill
2012-11-01 1:33 ` Rich Felker
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=20121012000034.GC254@brightrain.aerifal.cx \
--to=dalias@aerifal.cx \
--cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).