From owner-cvs-all Fri May 3 10:22:19 2002 Delivered-To: cvs-all@freebsd.org Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by hub.freebsd.org (Postfix) with ESMTP id C4FAD37B43C; Fri, 3 May 2002 10:21:34 -0700 (PDT) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020503172030.EKKN4412.rwcrmhc52.attbi.com@InterJet.elischer.org>; Fri, 3 May 2002 17:20:30 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id KAA83361; Fri, 3 May 2002 10:06:45 -0700 (PDT) Date: Fri, 3 May 2002 10:06:44 -0700 (PDT) From: Julian Elischer To: John Baldwin Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_fork.c In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 3 May 2002, John Baldwin wrote: > > > vfork() at least should use a flag that only fork's the current thread and > not all of the threads. I think only fork'ing one thread is quite doable. > We could also export the flag for fork() that allows just forking one thread > to userland. For exec() I suppose to avoid POLA we will just have to > terminate all the threads early on in the function in the kernel itself. > > As long as we do that I think we will still be ok. I agree.. the 'funnel' in exec() is of type 'kill' i.e. it leaves only the requesting thread runnning and commits murder on all othe rthreads.. BTW, there are 3 types of 'funnel' 1/ kill.... all other threads are killed .. used in exit() and exec() 2/ suspend... all other threads are suspended on the kernel boundary and the caller is allowed to proceed when they have all been accounted for. used in fork() (* parent that is). 3/ non-user.. The caller may proceed as long as no threads are in user space.. all threads attempting to enter user space will be suspended at the boundary.. useful for debugging from ptrace. > > -- > > John Baldwin <>< http://www.FreeBSD.org/~jhb/ > "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message