From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 30492 invoked from network); 7 Apr 1999 20:27:46 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 7 Apr 1999 20:27:46 -0000 Received: from piglet.twiddle.net (rth@piglet.twiddle.net [207.104.6.26]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id QAA12436 for ; Wed, 7 Apr 1999 16:07:59 -0400 Received: (from rth@localhost) by piglet.twiddle.net (8.8.7/8.8.7) id NAA25872; Wed, 7 Apr 1999 13:07:46 -0700 Message-ID: <19990407130746.A25805@twiddle.net> Date: Wed, 7 Apr 1999 13:07:46 -0700 From: Richard Henderson 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? References: <37026639.86DCFD34@sarnoff.com> <19990406202625.C15066@twiddle.net> <370BA0B7.737F62EE@sarnoff.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2 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~