Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jul 1997 17:30:46 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        msmith@atrad.adelaide.edu.au (Michael Smith)
Cc:        vinay@agni.nuko.com, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Location of copyin() and copyout()..
Message-ID:  <199707300030.RAA03691@phaeton.artisoft.com>
In-Reply-To: <199707290220.LAA09491@genesis.atrad.adelaide.edu.au> from "Michael Smith" at Jul 29, 97 11:50:40 am

next in thread | previous in thread | raw e-mail | index | archive | help
> It is generally considered _extremely_ bad to use copyin/copyout, as it
> precludes your functions from being called from within kernel space.
> 
> FWIW, this is what eventually stumped me when it came to getting Linux
> WABI running on FreeBSD.

This is a good point, considering that kernel preemption is one
of my own goals.

The issue is recursion with a paging operation in progress.

I think with the limited cases I gave (the page is filled, the
call made, and the page is still mapped) are OK.

copying out is more likely to cause problems than copying in,
since you copy in pages after they are touched, but you potentially
touch on copyout.

Probably there needs to be _copyin/_copyout for the internal usage,
and a "safe" copyin/copyout for usage which isn't safed against
reentrancy.


					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?199707300030.RAA03691>