Subject: Re: Curious limitation in copy_from_user()

From: Dan Malek <[email-masked]>
Date: Fri, 26 May 2000 16:54:55 -0400

Tom Roberts wrote:
>
> While porting Linux PPC to my hardware, I discovered a curious
> limitation in copy_from_user() -- it cannot handle uncached memory.

Yeeup.  We have discussed that before.  The later/newer kernels trap
this fault and emulate the data move.  Although there are some cases
as you just discovered, the larger sample indicated access to uncached
memory spaces required special handling so this wasn't going to be
a problem.

The only choice is to not take advantage of the performance enhancements,
which didn't seem like a good thing.  In your case, you will have to write
your own function to validate the user buffer space and then copy the
data in a loop.  Perhaps we need a copy_from_user_uncached() or
something.

	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/