This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Proposal for "internal" audit observers
- From: ppluzhnikov at google dot com (Paul Pluzhnikov)
- To: libc-alpha at sourceware dot org
- Cc: ppluzhnikov at google dot com
- Date: Thu, 11 Feb 2010 18:48:48 -0800 (PST)
- Subject: Proposal for "internal" audit observers
Greetings,
Current implementation of dl_iterate_phdrs() is not usable by libunwind,
because it requires a lock, and libunwind may execute in contexts where
locking is not possible (from within malloc, or from within async signal
handlers).
Previous attempts to solve this didn't go anywhere:
http://sources.redhat.com/ml/libc-hacker/2004-04/msg00031.html
Glibc now has the nice set of auditing interfaces, and la_objopen() and
la_objclose() appear to be all that libunwind needs.
Unfortunately, AFAICT the only way to register interest in auditing is
via LD_AUDIT setting (or explicit '--audit' loader flag).
Would glibc maintainers be open to a patch which allows a binary to egister
itself as an auditor?
I realize that auditing symbol bindings from within the binary itself is
likely very problematic, but for objopen/objclose auditing that shouldn't
be a problem (I think).
Thanks,
--
Paul Pluzhnikov