freebsd-skq/lib/libc
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
..
aarch64 Add support for usermode (vdso-like) gettimeofday(2) and 2015-12-07 12:20:26 +00:00
amd64 Add include for declaration of _set_tp(). Eliminates -Wmissing-prototypes warnings. 2015-09-20 04:59:01 +00:00
arm Do not compile ARMv6 instructions on ARMv4/v5. Although clang is fine 2015-12-24 22:13:52 +00:00
capability use .Mt to mark up email addresses consistently (part4) 2014-06-23 08:25:03 +00:00
compat-43 Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:53:24 +00:00
db Use intptr_t note ptrdiff_t when storing flags in the bottom bits of 2016-01-29 01:22:12 +00:00
gdtoa META MODE: Don't create .meta files when symlinking sources into the obj directory. 2015-11-25 19:44:43 +00:00
gen If libthr.so is dlopened without RTLD_GLOBAL flag, the libthr symbols 2016-02-08 19:24:13 +00:00
gmon Replace the last non-optional use of sbrk() in the tree with mmap(). 2016-01-21 18:17:19 +00:00
i386 Switch libc from using _sig{procmask,action,suspend} symbols, which 2015-08-29 14:25:01 +00:00
iconv libc: Use namespace.h in a few more files. 2015-12-20 23:05:20 +00:00
include If libthr.so is dlopened without RTLD_GLOBAL flag, the libthr symbols 2016-02-08 19:24:13 +00:00
inet Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:50:56 +00:00
isc Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-23 16:16:16 +00:00
locale Link localeconv(3) to localeconv_l(3) 2015-11-25 09:12:30 +00:00
md Bring the md5 functions into libc for internal use only. 2014-08-12 12:25:56 +00:00
mips Fix the implementations of PSEUDO_NOERROR and PSEUDO. 2016-01-21 17:29:01 +00:00
nameser Add missing break. 2014-08-20 14:58:25 +00:00
net Replace nslexer.l->nslexer.c custom rule with a -D CFLAG. 2016-01-27 01:33:23 +00:00
nls Move logic to destroy a struct catentry to its own function. 2016-02-02 23:33:58 +00:00
posix1e Remove names from some prototypes 2015-09-20 20:16:34 +00:00
powerpc Add include for declaration of _set_tp(). Eliminates -Wmissing-prototypes warnings. 2015-09-20 04:59:01 +00:00
powerpc64 Add include for declaration of _set_tp(). Eliminates -Wmissing-prototypes warnings. 2015-09-20 04:59:01 +00:00
quad Remove MK_ARM_EABI, the armeb issues have been fixed. The code to support 2014-10-01 08:26:51 +00:00
regex Add -static to CFLAGS to unbreak the tests by using a libc.a with 2015-12-13 06:33:52 +00:00
resolv Allow users override DEBUG on the command line via DEBUG_FLAGS="-DDEBUG" with 2015-12-15 05:37:09 +00:00
riscv Bring in initial libc and libstand support for RISC-V. 2016-01-17 15:21:23 +00:00
rpc Fix a mismerge from NetBSD in r162194 with xdr_rpcb_entry_list_ptr(..) 2016-01-12 00:20:57 +00:00
secure Remove a stale comment and clarify the original where it was taken from 2015-08-14 14:58:04 +00:00
softfloat Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP} 2014-03-04 02:19:39 +00:00
sparc64 Fix unused-but-set-variable 2015-11-15 20:44:22 +00:00
stdio Use __alignof__ instead of assuming int64_t to get the right 2015-12-30 03:36:22 +00:00
stdlib Add .NOMETA missed in r291320. 2016-01-20 20:58:42 +00:00
stdtime Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. 2015-09-20 20:51:52 +00:00
string Add a standards compliance note for strtok_r as suggested by cpercival. 2016-01-22 20:36:03 +00:00
sys If libthr.so is dlopened without RTLD_GLOBAL flag, the libthr symbols 2016-02-08 19:24:13 +00:00
tests This seems like a very trivial bug that should have been squashed a long 2016-01-30 04:16:05 +00:00
uuid Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP} 2014-03-04 02:19:39 +00:00
xdr Bring in initial libc and libstand support for RISC-V. 2016-01-17 15:21:23 +00:00
yp If a NIS server has long entries on its database that is bigger than 2015-11-19 13:36:53 +00:00
libc.ldscript
Makefile Remove excess whitespace 2016-01-27 00:24:24 +00:00
Makefile.depend Update META_MODE dependencies. 2015-09-17 05:06:34 +00:00
Versions.def Fix the inheritance of the FBSDprivate_1.0 namespace. 2014-04-03 17:31:38 +00:00