Messages in this thread | | | Date | Wed, 7 Apr 1999 13:07:46 -0700 | From | Richard Henderson <> | Subject | Re: 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/
| |