From owner-cvs-all@FreeBSD.ORG Mon Oct 20 08:48:05 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 7F11016A4BF; Mon, 20 Oct 2003 08:48:05 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id AACCE43FCB; Mon, 20 Oct 2003 08:48:00 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9p2/8.12.9) with ESMTP id h9KFl8Mg018206; Mon, 20 Oct 2003 11:47:09 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)h9KFl8I7018203; Mon, 20 Oct 2003 11:47:08 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Mon, 20 Oct 2003 11:47:08 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: David Malone In-Reply-To: <200310200848.aa99929@salmon.maths.tcd.ie> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: "Alan L. Cox" cc: src-committers@freebsd.org cc: Scott Long cc: cvs-all@freebsd.org cc: cvs-src@freebsd.org Subject: Re: cvs commit: src/sys/dev/streams streams.c src/sys/kernkern_descrip.c kern_event.c sys_pipe.c uipc_syscalls.cvfs_syscalls.c src/sys/opencrypto cryptodev.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, 20 Oct 2003 15:48:05 -0000 On Mon, 20 Oct 2003, David Malone wrote: > > > This reminds me that we still hold Giant around pipe(2) because it isn't > > > declared MPSAFE in the syscall table. Is this still necessary? > > > I've been suspicious of this too, and I was hoping that you would have > > an answer. Can we go ahead and correct this? > > I think we may need to check the calling of pipeclose() in pipe(), but > as this is only done in an error case, it is probably safe enough to > just grab Giant for that. (The mac_* calls may need to be checked too). The MAC Framework itself doesn't require Giant, but sometimes data used by the Framework is protected by locks outside the Framework, which sometimes requires Giant. In the case of the Pipe code, MAC labels in pipes are protected by the pipe mutex, so the MAC Framework asserts the pipe mutex. It should be fine to drop Giant in the pipe code for the purposes of the MAC Framework. Currently, the MAC Framework depends on Giant in as much as VFS depends on Giant for vnode locking correctness. In addition, it depends on Giant for socket labels due to the lack of socket locking. In our development tree, we have some locking improvements for System V IPC and Posix IPC code that I believe prevents us from needing Giant for those entry points, but those changes are not yet in the base FreeBSD tree. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories