Date: Wed, 30 Jul 1997 09:50:36 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: dg@root.com Cc: terry@lambert.org, freebsd-hackers@FreeBSD.ORG Subject: Re: Location of copyin() and copyout().. Message-ID: <199707301650.JAA05201@phaeton.artisoft.com> 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
> >Probably there needs to be _copyin/_copyout for the internal usage, > >and a "safe" copyin/copyout for usage which isn't safed against > >reentrancy. > > 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. > 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). The magic I was thinking of was related to reentrancy... I could see how you could also make the statement Mike made, and have it refer to the copy[in|out] -> bcopy conversion (ie: you can't call the new function from the kernel if your code will attempt a copy[in|out] instead of a bcopy). Shows my bias as a kernel preemption/multithreaing advocate, I suppose. ;-). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707301650.JAA05201>