From owner-freebsd-hackers Fri Jul 13 11:21:46 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from avocet.mail.pas.earthlink.net (avocet.mail.pas.earthlink.net [207.217.121.50]) by hub.freebsd.org (Postfix) with ESMTP id 5BC9D37B401; Fri, 13 Jul 2001 11:21:44 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from mindspring.com (dialup-209.245.130.157.Dial1.SanJose1.Level3.net [209.245.130.157]) by avocet.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id LAA11658; Fri, 13 Jul 2001 11:21:37 -0700 (PDT) Message-ID: <3B4F3C55.95B8FF6F@mindspring.com> Date: Fri, 13 Jul 2001 11:22:13 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Alfred Perlstein Cc: Greg Lehey , y-carden@uniandes.edu.co, FreeBSD Hackers Subject: Re: Some questions about kernel programming References: <20010713113822.V45037@wantadilla.lemis.com> <20010712212809.F6664@sneakerz.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Alfred Perlstein wrote: > > write() doesn't exist in the kernel. The simple answer is "you're > > going to have to read what the send() syscall does and emulate it". > > First, though, you need to answer the question "why do I want to do > > this in the kernel?" > > it actually exists, however the problem is that copyin and friends > assume a seperate address space, I wonder if one could do some trick > to alias the seperate address space on top of the kernel, that should > allow copyin and friends to work on pointers into the kernel's address > space. The fix is to use uiomove directly, and pass UIO_SYSSPACE or UIO_USERSPACE as a parameter, and break the API's for the system calls themselves into two parts. I've been complaining for years that people treat the system call interface as the only possible VFS consumer. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message