From owner-freebsd-arch@FreeBSD.ORG Tue Jul 8 16:54:51 2008 Return-Path: Delivered-To: arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E16671065689 for ; Tue, 8 Jul 2008 16:54:51 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id B9A118FC2D for ; Tue, 8 Jul 2008 16:54:51 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 55A8C46BB5; Tue, 8 Jul 2008 12:54:51 -0400 (EDT) Date: Tue, 8 Jul 2008 17:54:51 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ed Schouten In-Reply-To: <20080708153632.GI14567@hoeg.nl> Message-ID: <20080708174957.M41405@fledge.watson.org> References: <9484951.340521215467447990.JavaMail.root@vms126.mailsrvcs.net> <20080708001929.E63144@fledge.watson.org> <20080708161802.N89342@fledge.watson.org> <20080708153632.GI14567@hoeg.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@FreeBSD.ORG Subject: Re: Proposal: a revoke() system call X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2008 16:54:52 -0000 On Tue, 8 Jul 2008, Ed Schouten wrote: > I also noticed similar constructs inside the stat() calls, to translate > device major/minor numbers. As you can see, some stat() routines call > translate_path_major_minor_at() after performing the regular stat() > operation. The translate_path_major_minor_at() is implemented by calling > kern_openat(). This has three disadvantages: > > - It is non-atomic. > > - It can only perform the translation on nodes it has O_RDONLY access > to. This shouldn't be a big problem, but may cause inconsistencies > when users look around in devfs. > > - The translation may not always work when the calling process is out of > file descriptors. - Opening a device node can have side effects, such as rewinding tapes, raising DTR on serial lines, triggering errors, or denying access to other consumers due to exclusive access requirements. Robert N M Watson Computer Laboratory University of Cambridge