lkml.org 
[lkml]   [1999]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: vremap and memcpy_to_fs in 2.2.x?
On Wed, Apr 07, 1999 at 02:15:19PM -0400, AARON MARKS wrote:
> > > vremap() -> ioremap()
> >
> > This is correct.
>
> I ended up using phys_to_virt() instead.

These are very different things, and are not interchangeable.
What do you think you are doing?

> And for this, I just did a straight assignment:
>
> This:
> memcpy_tofs(out, &si, sizeof(si));
>
> Became this:
> *out = si;

Wrong wrong wrong wrong wrong!

DO USE copy_to_user or put_user. First, it plugs big oops leaks.
Second, nice systems like m68k or Sparc64 put userland in a
completely different address space, so assignment won't even
pretend to begin to work.



r~

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.042 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site