> Linux, as written for the x86, goes very heavily for inlining.
> Rather than call specially protected copyin/copyout sorts
> of routines for manipulating user memory, Linux uses inline
> macros (copy_from_user/copy_to_user, etc.) that depend on
Its up to the port how it is done. Most of them are non inline for
x86 for example.
> __access_ok routine, but it is much more heavyweight
> than the old heuristic. Not only does it need to check the
> virtual address against the process' VMAs, but it needs
Its broken if it does that. The process VMA may change on an SMP box or
during fault handling sleeps.
__access_ok has one purpose. To verify the address range given is entirely
sensible to feed to __copy_*_user. If you have to do handling the complex
way (eg if your cpu design requires it) then __access_ok can just return 1
and the __copy_*_user - inline or out of line - can do all the work.