From owner-freebsd-arch Wed Jan 22 4:18:52 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A7EC37B401; Wed, 22 Jan 2003 04:18:51 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78C7B43F18; Wed, 22 Jan 2003 04:18:50 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.6/8.12.5) with SMTP id h0MCIUP4025285; Wed, 22 Jan 2003 07:18:31 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Wed, 22 Jan 2003 07:18:30 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Matthew Dillon Cc: Peter Wemm , phk@FreeBSD.ORG, "Alan L. Cox" , arch@FreeBSD.ORG Subject: Re: getsysfd() patch #1 (Re: Virtual memory question) In-Reply-To: <200301220424.h0M4OdZn000391@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 21 Jan 2003, Matthew Dillon wrote: > Hmm. Well, the opengroup manual page for fattach() basically says > that you fattach(filedes, path) to an existing file and operations on > the file are then operations on filedes, but the manual page is > specifically STREAM oriented. We could use it for other types of > file descriptors but I'm somewhat worried about how error conditions > would be detected... for a memory descriptor how do you know you are > mmap()ing the memory descriptor rather then the file? Yeah, I have to admit I'm not thrilled by these prospects -- there are lots of places in the kernel where we directly operate on the vnode w/o a struct file, or the supporting device, etc. Implementing consistent semantics would be daunting at best. One of the nice things about the current patch + rename to memfd system call was the pure simplicity of it. It introduces one new type of object created by a simple system call, and then a single operation on it, mmap(). I recognize the benefits of explicit namespaces in IPC, of course... Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message