opnsense-src/lib/libc/include
Konstantin Belousov bd43f0691c If libthr.so is dlopened without RTLD_GLOBAL flag, the libthr symbols
do not participate in the global symbols namespace, but rtld locks are
still replaced and functions are interposed.  In particular,
__pthread_map_stacks_exec is resolved to the libc version.  If a
library is loaded later, which requires adjustment of the stack
protection mode, rtld calls into libc __pthread_map_stacks_exec due to
the symbols scope.  The libc version might recurse into binder and
recursively acquire rtld bind lock, causing the hang.

Make libc __pthread_map_stacks_exec() interposed, which synchronizes
rtld locks and version of the stack exec hook when libthr loaded,
regardless of the symbol scope control or symbol resolution order.

The __pthread_map_stacks_exec() symbol is removed from the private
version in libthr since libc symbol now operates correctly in presence
of libthr.

Reported and tested by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2016-02-08 19:24:13 +00:00
..
isc Update our stub resolver to final version of libbind. 2014-08-12 12:36:06 +00:00
block_abi.h Add an extra void* cast to work around a bug in FreeBSD-gcc inherited 2014-04-03 08:08:36 +00:00
compat.h Reassign copyright statements on several files from Advanced 2015-04-23 14:22:20 +00:00
errlst.h Revert r274772: it is not valid on MIPS 2014-11-25 03:50:31 +00:00
fpmath.h Add support for the FPA floating-point format on ARM. The 2008-12-23 22:20:59 +00:00
libc_private.h If libthr.so is dlopened without RTLD_GLOBAL flag, the libthr symbols 2016-02-08 19:24:13 +00:00
namespace.h Add implementations of sendmmsg(3) and recvmmsg(3) functions which 2016-01-29 14:12:12 +00:00
nscache.h - Extend the nsswitch to support Services, Protocols and Rpc 2006-04-28 12:03:38 +00:00
nscachedcli.h - Extend the nsswitch to support Services, Protocols and Rpc 2006-04-28 12:03:38 +00:00
nss_tls.h Revert unnecessary memset after calloc. 2009-05-28 15:02:21 +00:00
port_after.h We have gmtime_r(3). 2006-03-21 18:31:24 +00:00
port_before.h Update our stub resolver to final version of libbind. 2014-08-12 12:36:06 +00:00
reentrant.h The NetBSD Foundation has granted permission to remove clause 3 and 4 from 2010-03-02 17:20:04 +00:00
resolv_mt.h Vendor import of BIND 9.3.2 2006-03-21 15:03:19 +00:00
spinlock.h Remove 3rd clause, renumber, ok per email 2007-01-12 07:31:30 +00:00
un-namespace.h Add implementations of sendmmsg(3) and recvmmsg(3) functions which 2016-01-29 14:12:12 +00:00