Date: Wed, 30 Jul 1997 11:47:21 +0930 (CST) From: Michael Smith <msmith@atrad.adelaide.edu.au> To: dg@root.com Cc: terry@lambert.org, freebsd-hackers@FreeBSD.ORG Subject: Re: Location of copyin() and copyout().. Message-ID: <199707300217.LAA16641@genesis.atrad.adelaide.edu.au> In-Reply-To: <199707300146.SAA11272@implode.root.com> from David Greenman at "Jul 29, 97 06:46:08 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
David Greenman stands accused of saying: > > There is no problem with using copyout() in the kernel to copy data out to > a user process, assuming that the currently running process is the intended > target of the copy. That is the sole purpose of the function. copyout() > correctly handles all issues of COW/ZF/page faults. The only issue here is that the consumer of your service may _not_ be a user process, eg. in the case of an ABI emulation module. I would specifically request that people avoid using copyout unless they can be _absolutely_ certain that they will only ever be talking to user processes. As I said, this has already caused me heartache several times 8( > uiomove() is escentially a wrapper for copyin/copyout that has an > optimization for the case of kernel-to-kernel copies (in which case it > uses bcopy instead). You're ignoring the support for readv/writev here, although it would seem that user-level scatter-gather never really took off. > -DG -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707300217.LAA16641>