From owner-cvs-all@FreeBSD.ORG Sun Jul 6 22:50:28 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C317B37B401; Sun, 6 Jul 2003 22:50:28 -0700 (PDT) Received: from exchhz01.viatech.com.cn (ip-167-164-97-218.anlai.com [218.97.164.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3785A43F85; Sun, 6 Jul 2003 22:50:25 -0700 (PDT) (envelope-from davidxu@viatech.com.cn) Received: from davidw2k (ip-240-1-168-192.rev.dyxnet.com [192.168.1.240]) by exchhz01.viatech.com.cn with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id 3MLFWXYV; Mon, 7 Jul 2003 13:33:26 +0800 Message-ID: <004301c3444c$1ae0f6e0$f001a8c0@davidw2k> From: "David Xu" To: "Alfred Perlstein" References: <200307070428.h674SNfq092785@repoman.freebsd.org> <20030707044204.GM72093@elvis.mu.org> <005f01c34442$f9091c40$f001a8c0@davidw2k> <20030707054153.GN72093@elvis.mu.org> Date: Mon, 7 Jul 2003 13:53:35 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libpthread/thread thr_attr_get_np.c thr_cancel.c thr_getschedparam.c thr_join.c thr_mutex_prioceiling.c thr_sigaction.c thr_sigmask.c thr_sigpending.c thr_sigsuspend.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2003 05:50:29 -0000 ----- Original Message -----=20 From: "Alfred Perlstein" To: "David Xu" Cc: ; ; = Sent: Monday, July 07, 2003 1:41 PM Subject: Re: cvs commit: src/lib/libpthread/thread thr_attr_get_np.c = thr_cancel.c thr_getschedparam.c thr_join.c thr_mutex_prioceiling.c = thr_sigaction.c thr_sigmask.c thr_sigpending.c thr_sigsuspend.c > > > > Log: > > > > Avoid accessing user provided parameters in critical region. > > >=20 > > > Interesting, is this to avoid pagefaults during critical sections > > > inside userspace? > > >=20 > > Yes. >=20 > Sorry to yammer out a bunch of questions out of the blue, but I'm > trying to understand: >=20 > Is that completely necessary? I mean, isn't it likely that these > arguements are paged in since they are parameters that have just > been touched by the process? What if there's paging pressure and > the stack gets paged out anyway? Is there something protecting > that from happening? I mean, I know it would be unpleasant to > fault, but the code should be able to handle this right? >=20 No, sorry for confusing, it is used to avoid SIGSEGV in critical region, because thread is holding low level locks or in critical region, SIGSEGV can not delivered and possible causes deadlock. This change can not 100% avoid the problem, but in most cases, this=20 would make libkse more sane when it encounters SIGSEGV. David Xu > --=20 > -Alfred Perlstein [alfred@freebsd.org] > 'Instead of asking why a piece of software is using "1970s = technology," > start asking why software is ignoring 30 years of accumulated wisdom.'