Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 11 Oct 2012 20:00:34 -0400
From: Rich Felker <>
Subject: Re: PATCH: dl_iterate_phdr()

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.


Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.