From owner-cvs-src-old@FreeBSD.ORG Sun Jan 9 12:38:55 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D61F106566B for ; Sun, 9 Jan 2011 12:38:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0AF498FC16 for ; Sun, 9 Jan 2011 12:38:55 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p09Ccsi3012984 for ; Sun, 9 Jan 2011 12:38:54 GMT (envelope-from kib@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p09Ccs5L012983 for cvs-src-old@freebsd.org; Sun, 9 Jan 2011 12:38:54 GMT (envelope-from kib@repoman.freebsd.org) Message-Id: <201101091238.p09Ccs5L012983@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to kib@repoman.freebsd.org using -f From: Konstantin Belousov Date: Sun, 9 Jan 2011 12:38:40 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libthr pthread.map src/lib/libthr/thread thr_create.c thr_private.h thr_rtld.c thr_stack.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jan 2011 12:38:55 -0000 kib 2011-01-09 12:38:40 UTC FreeBSD src repository Modified files: lib/libthr pthread.map lib/libthr/thread thr_create.c thr_private.h thr_rtld.c thr_stack.c Log: SVN rev 217191 on 2011-01-09 12:38:40Z by kib Implement the __pthread_map_stacks_exec() for libthr. Stack creation code is changed to call _rtld_get_stack_prot() to get the stack protection right. There is a race where thread is created during dlopen() of dso that requires executable stacks. Then, _rtld_get_stack_prot() may return PROT_READ | PROT_WRITE, but thread is still not linked into the thread list. In this case, the callback misses the thread stack, and rechecks the required protection afterward. Reviewed by: davidxu Revision Changes Path 1.41 +2 -0 src/lib/libthr/pthread.map 1.50 +11 -0 src/lib/libthr/thread/thr_create.c 1.120 +1 -0 src/lib/libthr/thread/thr_private.h 1.16 +5 -0 src/lib/libthr/thread/thr_rtld.c 1.9 +34 -1 src/lib/libthr/thread/thr_stack.c