From owner-freebsd-current Thu Apr 3 17:04:29 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id RAA02132 for current-outgoing; Thu, 3 Apr 1997 17:04:29 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id RAA02119 for ; Thu, 3 Apr 1997 17:04:25 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id RAA17931; Thu, 3 Apr 1997 17:47:04 -0700 From: Terry Lambert Message-Id: <199704040047.RAA17931@phaeton.artisoft.com> Subject: Re: DISCUSS: system open file table To: dg@root.com Date: Thu, 3 Apr 1997 17:47:04 -0700 (MST) Cc: terry@lambert.org, current@FreeBSD.ORG In-Reply-To: <199704040036.QAA05861@root.com> from "David Greenman" at Apr 3, 97 04:36:50 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > >4) Any other kernel file I/O operations which rely > > on stored credentials established at file open(*). > > > > (*) The descriptor f_type and f_ops field are not > > relevent arguments in favor of this, since they > > are cruft which should be diked out. > > It's already trivially easy to do file I/O in the kernel without a file > descriptor. As you know, a "file descriptor" in FreeBSD is only a mechanism > to translate a per-process file handle to a kernel vnode. For this reason, > the very notion of a "file descriptor" is only relevant in the context of > a process. It sounds like #4 is the main thing you're after, but I fail to > see how this is relevant unless you have a process context in which to do > the I/O, and in that case you already have easy access to the process' > credentials. But... currently, a vnode reference is not the same thing as an open reference. Also, for things like a CIFS/SMBFS/AppleTalk/NetWare client, I want to be able to use credentials which are not BSD process credentials, but user credentials. If a vnode reference becomes an open reference, this resolves a lot of things, but it still doesn't resolve traversal of the system open file table, which is needed by sysctl (in general), identd (for credential vouchsafing), and for accounting reasons (when I want to unmount an FS with open files, etc.). I want to make the distinction between a cached reference and a real reference, as well, both for the file I/O in a kernel thread, and to get around some of the recent problems that come from VOP_LOCK handling two types of locks. Finally, there is the issue of taking faults in kernel mode without a process context to sleep on. I'd like to see the sleeping moved to the address of the field in the system open file table,so that the sleep handle doesn't have to know what kind of caller is making the call. Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.