Proposal for "internal" audit observers

Paul Pluzhnikov ppluzhnikov@google.com
Fri Feb 12 05:10:00 GMT 2010


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



More information about the Libc-alpha mailing list