From: Richard Henderson <rth@twiddle.net>
To: amarks@sarnoff.com
Cc: linux-kernel@vger.rutgers.edu, axp-list@redhat.com
Subject: Re: vremap and memcpy_to_fs in 2.2.x?
Date: Wed, 7 Apr 1999 13:07:46 -0700 [thread overview]
Message-ID: <19990407130746.A25805@twiddle.net> (raw)
In-Reply-To: <370BA0B7.737F62EE@sarnoff.com>; from AARON MARKS on Wed, Apr 07, 1999 at 02:15:19PM -0400
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~
prev parent reply other threads:[~1999-04-07 20:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-03-31 18:15 vremap and memcpy_to_fs in 2.2.x? AARON MARKS
1999-04-07 3:26 ` Richard Henderson
1999-04-07 18:15 ` AARON MARKS
1999-04-07 20:07 ` Richard Henderson [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox