From owner-svn-src-all@FreeBSD.ORG Wed Sep 5 13:54:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D07861065673; Wed, 5 Sep 2012 13:54:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id A2E028FC12; Wed, 5 Sep 2012 13:54:57 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0696BB972; Wed, 5 Sep 2012 09:54:57 -0400 (EDT) From: John Baldwin To: Andriy Gapon Date: Wed, 5 Sep 2012 08:14:14 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201208222002.q7MK2gVY089435@svn.freebsd.org> <5046F612.5090500@FreeBSD.org> In-Reply-To: <5046F612.5090500@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201209050814.14578.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 05 Sep 2012 09:54:57 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r239587 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 13:54:57 -0000 On Wednesday, September 05, 2012 2:49:54 am Andriy Gapon wrote: > on 22/08/2012 23:02 John Baldwin said the following: > > Author: jhb > > Date: Wed Aug 22 20:02:42 2012 > > New Revision: 239587 > > URL: http://svn.freebsd.org/changeset/base/239587 > > > > Log: > > Assert that system calls do not leak a pinned thread (via sched_pin()) to > > userland. > > > > Modified: > > head/sys/kern/subr_syscall.c > > > > Modified: head/sys/kern/subr_syscall.c > > ============================================================================== > > --- head/sys/kern/subr_syscall.c Wed Aug 22 20:01:57 2012 (r239586) > > +++ head/sys/kern/subr_syscall.c Wed Aug 22 20:02:42 2012 (r239587) > > @@ -188,6 +188,9 @@ syscallret(struct thread *td, int error, > > I wonder if userret() would be a better place for this assert as well as the > asserts that were already there. userret seems to cover more cases and includes > the syscallret case. The one caveat of moving this to userret() is that you lose detail in the panic message (i.e., the name of the system call that caused the problem). However, it would be perfectly logical to move this entire block of assertions to the bottom of userret() to catch any lock or other leaks from ast() or traps. -- John Baldwin