From owner-freebsd-hackers Wed Jul 30 10:32:38 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id KAA18499 for hackers-outgoing; Wed, 30 Jul 1997 10:32:38 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id KAA18484 for ; Wed, 30 Jul 1997 10:32:32 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id KAA05329; Wed, 30 Jul 1997 10:30:42 -0700 From: Terry Lambert Message-Id: <199707301730.KAA05329@phaeton.artisoft.com> Subject: Re: Location of copyin() and copyout().. To: sef@Kithrup.COM (Sean Eric Fagan) Date: Wed, 30 Jul 1997 10:30:42 -0700 (MST) Cc: hackers@FreeBSD.ORG In-Reply-To: <199707300344.UAA16264@kithrup.com> from "Sean Eric Fagan" at Jul 29, 97 08:44:55 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-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Now consider ibcs2_fstat(). Rather than duplicate the work of fstat > (which would really be a bad thing, because fstat may change and > ibcs2_fstat may not be updated), ibcs2_fstat goes through some > *HORRIBLE* hacks to allocate some space in user space, using the > stackgap_alloc() function. > > If fstat used uiomove(), then it could go to a kernel address. > (Admittedly, it would still have to be changed -- it would have to have a > struct uio passed in, probably. But then ibcs2_fstat could call that > common function, with less pain.) Better to have a common function that was not a system-specific system call implementation, and have the system specific system call and the ABI system call call the same function. This implies a kernel level service interface that does not currently exist. Nevertheless, this would be very useful for doing things like moving NFS servers and others into kernel threads instead of heavier user processes which call a system call and never return. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.