From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 6 12:38:18 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B3EF416A41F for ; Fri, 6 Jul 2007 12:38:18 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.pkgsrc-box.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id 7FA3F13C46E for ; Fri, 6 Jul 2007 12:38:15 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.pkgsrc-box.org [127.0.0.1]) by www.pkgsrc-box.org (Postfix) with ESMTP id A2C89E7A3FA for ; Fri, 6 Jul 2007 12:38:07 +0000 (UTC) Received: by britannica.bec.de (Postfix, from userid 1000) id C3F157D6C; Fri, 6 Jul 2007 14:37:20 +0200 (CEST) Date: Fri, 6 Jul 2007 14:37:20 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20070706123720.GC427@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20070705122650.GE1302@britannica.bec.de> <468E16E6.6030608@delphij.net> <20070706124407.T9997@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070706124407.T9997@fledge.watson.org> User-Agent: Mutt/1.5.13 (2006-08-11) Subject: Re: add closefrom() call X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2007 12:38:18 -0000 On Fri, Jul 06, 2007 at 12:50:17PM +0100, Robert Watson wrote: > Solaris side-steps this issue by simply auditing the individual close() > system calls. My preference would be that we implement this in user space > also, which would likewise generate a series of audit events, one for each > system call. The procfs optimization they use (I wonder -- is it really an > optimization?) won't work for us, however. Do you think that there's a > strong motivation to provide a closefrom(2) system call, rather than a > closefrom(3) library call? This would let us neatly avoid the question > you've posed :-). I can think of at least one possible scenario where it makes a difference: multi-threaded applications with concurrent open/closefrom calls. I would expect the kernel version to ensure that all open files start from the given file descriptor. Joerg