Re: To all architecture maintainers: RFC: mmap2()

From: David S. Miller (davem@redhat.com)
Date: Sat Jan 08 2000 - 16:41:28 EST


   From: Russell King <rmk@arm.linux.org.uk>
   Date: Sat, 8 Jan 2000 20:46:52 +0000 (GMT)

   Sparc's mmap2() consists of:

           /* Make sure the shift for mmap2 is constant (12), no matter what PAGE_SIZE
              we have. */
           return do_mmap2(addr, len, prot, flags, fd, pgoff >> (PAGE_SHIFT - 12));

   What happens if you have an 8K page size (PAGE_SHIFT == 13), and the
   user supplies an odd number in pgoff?

He won't because he obtained sys_getpagesize() first and used that
to make sure his pgoff argument was page aligned.

Later,
David S. Miller
davem@redhat.com

-
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/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:13 EST