freebsd-nq/lib/libthr/thread
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
..
Makefile.inc Merge all the copies of _tcb_ctor and _tcb_dtor. 2015-01-21 16:41:05 +00:00
thr_affinity.c
thr_attr.c
thr_autoinit.c
thr_barrier.c Fully initialize allocated memory for the new barrier. The 2015-02-06 12:18:38 +00:00
thr_barrierattr.c
thr_cancel.c The SUSv4tc1 requires that pthread_setcancelstate() shall be not a 2013-06-19 04:47:41 +00:00
thr_clean.c _pthread_cleanup_push: fix allocator sizeof operand mismatch 2015-04-22 16:51:21 +00:00
thr_concurrency.c
thr_cond.c Fix typo in a comment. 2014-09-02 18:21:19 +00:00
thr_condattr.c
thr_create.c cosmetic: whitespaces-tab before EOL 2015-07-08 16:35:24 +00:00
thr_ctrdtr.c Merge all the copies of _tcb_ctor and _tcb_dtor. 2015-01-21 16:41:05 +00:00
thr_detach.c
thr_equal.c
thr_event.c
thr_exit.c Revert r274772: it is not valid on MIPS 2014-11-25 03:50:31 +00:00
thr_fork.c Typo. 2015-12-27 01:14:42 +00:00
thr_getcpuclockid.c
thr_getprio.c
thr_getschedparam.c
thr_getthreadid_np.c
thr_info.c
thr_init.c libthr: Don't use both __sys_open() and __sys_openat(). 2015-12-20 16:33:56 +00:00
thr_join.c
thr_kern.c
thr_kill.c In _pthread_kill(), if passed pthread is current thread, do not send 2014-02-01 18:13:18 +00:00
thr_list.c
thr_main_np.c
thr_multi_np.c
thr_mutex.c Propagate errors from _thr_umutex_unlock2 through mutex_unlock_common. 2015-02-25 16:18:26 +00:00
thr_mutexattr.c
thr_once.c Style. Use ANSI definition, wrap long lines, no initialization in 2015-09-08 08:48:53 +00:00
thr_printf.c Fix known issues which blow up the process after dlopen("libthr.so") 2015-01-03 18:38:46 +00:00
thr_private.h If libthr.so is dlopened without RTLD_GLOBAL flag, the libthr symbols 2016-02-08 19:24:13 +00:00
thr_pspinlock.c
thr_resume_np.c
thr_rtld.c Pre-resolve symbols required for the deferred signal processing. This 2015-08-10 17:02:42 +00:00
thr_rwlock.c
thr_rwlockattr.c
thr_self.c
thr_sem.c
thr_setprio.c
thr_setschedparam.c
thr_sig.c Pre-resolve symbols required for the deferred signal processing. This 2015-08-10 17:02:42 +00:00
thr_single_np.c
thr_sleepq.c
thr_spec.c Some third-party malloc(3) implementations use pthread_setspecific(3) 2015-05-15 08:40:17 +00:00
thr_spinlock.c Properly interpose libc spinlocks, was missed in r276630. In 2015-02-14 11:47:40 +00:00
thr_stack.c If libthr.so is dlopened without RTLD_GLOBAL flag, the libthr symbols 2016-02-08 19:24:13 +00:00
thr_suspend_np.c
thr_switch_np.c
thr_symbols.c
thr_syscalls.c If libthr.so is dlopened without RTLD_GLOBAL flag, the libthr symbols 2016-02-08 19:24:13 +00:00
thr_umtx.c libthr: const-ify two variables 2016-01-13 22:34:55 +00:00
thr_umtx.h libthr: Fix a parameter name in an internal header file. 2013-04-27 14:21:36 +00:00
thr_yield.c