Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jul 2001 11:22:13 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Alfred Perlstein <bright@sneakerz.org>
Cc:        Greg Lehey <grog@FreeBSD.ORG>, y-carden@uniandes.edu.co, FreeBSD Hackers <hackers@FreeBSD.ORG>
Subject:   Re: Some questions about kernel programming
Message-ID:  <3B4F3C55.95B8FF6F@mindspring.com>
References:  <M2001071206580901828@Ayax.uniandes.edu.co> <20010713113822.V45037@wantadilla.lemis.com> <20010712212809.F6664@sneakerz.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B4F3C55.95B8FF6F>