From 146b187d13b83615f02a68c038af82670588495f Mon Sep 17 00:00:00 2001 From: kib Date: Sat, 29 Aug 2015 14:25:01 +0000 Subject: Switch libc from using _sig{procmask,action,suspend} symbols, which are aliases for the syscall stubs and are plt-interposed, to the libc-private aliases of internally interposed sigprocmask() etc. Since e.g. _sigaction is not interposed by libthr, calling signal() removes thr_sighandler() from the handler slot etc. The result was breaking signal semantic and rtld locking. The added __libc_sigprocmask and other symbols are hidden, they are not exported and cannot be called through PLT. The setjmp/longjmp functions for x86 were changed to use direct calls, and since PIC_PROLOGUE only needed for functional PLT indirection on i386, it is removed as well. The PowerPC bug of calling the syscall directly in the setjmp/longjmp implementation is kept as is. Reported by: Pete French Tested by: Michiel Boland Reviewed by: jilles (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week --- lib/libc/gen/siginterrupt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/libc/gen/siginterrupt.c') diff --git a/lib/libc/gen/siginterrupt.c b/lib/libc/gen/siginterrupt.c index fde33ca..d99b772 100644 --- a/lib/libc/gen/siginterrupt.c +++ b/lib/libc/gen/siginterrupt.c @@ -43,14 +43,13 @@ __FBSDID("$FreeBSD$"); * after an instance of the indicated signal. */ int -siginterrupt(sig, flag) - int sig, flag; +siginterrupt(int sig, int flag) { extern sigset_t _sigintr __hidden; struct sigaction sa; int ret; - if ((ret = _sigaction(sig, (struct sigaction *)0, &sa)) < 0) + if ((ret = __libc_sigaction(sig, (struct sigaction *)0, &sa)) < 0) return (ret); if (flag) { sigaddset(&_sigintr, sig); @@ -59,5 +58,5 @@ siginterrupt(sig, flag) sigdelset(&_sigintr, sig); sa.sa_flags |= SA_RESTART; } - return (_sigaction(sig, &sa, (struct sigaction *)0)); + return (__libc_sigaction(sig, &sa, (struct sigaction *)0)); } -- cgit v1.1