Lennert Buytenhek
06c67befee
[PATCH] make valid_mmap_phys_addr_range() take a pfn
...
Newer ARMs have a 40 bit physical address space, but mapping physical
memory above 4G needs a special page table format which we (currently?) do
not use for userspace mappings, so what happens instead is that mapping an
address >= 4G will happily discard the upper bits and wrap.
There is a valid_mmap_phys_addr_range() arch hook where we could check for
>= 4G addresses and deny the mapping, but this hook takes an unsigned long
address:
static inline int valid_mmap_phys_addr_range(unsigned long addr, size_t size);
And drivers/char/mem.c:mmap_mem() calls it like this:
static int mmap_mem(struct file * file, struct vm_area_struct * vma)
{
size_t size = vma->vm_end - vma->vm_start;
if (!valid_mmap_phys_addr_range(vma->vm_pgoff << PAGE_SHIFT, size))
So that's not much help either.
This patch makes the hook take a pfn instead of a phys address.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-10 13:24:25 -07:00
..
2006-06-30 18:27:16 +02:00
2005-04-16 15:20:36 -07:00
2006-04-06 14:42:38 -07:00
2006-04-20 10:16:11 -07:00
2005-06-07 12:35:43 -07:00
2006-04-26 12:56:16 +01:00
2006-03-23 07:38:17 -08:00
2005-09-07 16:57:21 -07:00
2006-05-05 11:37:15 -07:00
2005-06-23 09:45:22 -07:00
2006-01-08 20:14:02 -08:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-04-26 12:56:16 +01:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-03-27 08:44:48 -08:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-04-26 12:56:16 +01:00
2005-04-16 15:20:36 -07:00
2006-04-26 12:56:16 +01:00
2006-04-26 12:56:16 +01:00
2006-03-26 08:56:54 -08:00
2006-04-26 12:56:16 +01:00
2005-07-26 14:35:41 -07:00
2005-04-16 15:20:36 -07:00
2005-09-07 16:57:38 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-01-08 20:13:39 -08:00
2005-04-21 11:07:59 -07:00
2006-04-26 12:56:16 +01:00
2006-06-29 10:26:23 -07:00
2006-04-26 12:56:16 +01:00
2005-04-16 15:20:36 -07:00
2006-04-26 12:56:16 +01:00
2006-02-07 08:49:27 -08:00
2006-04-26 12:56:16 +01:00
2006-07-10 13:24:25 -07:00
2006-01-10 08:01:34 -08:00
2005-04-16 15:20:36 -07:00
2005-09-07 14:00:40 -07:00
2005-04-16 15:20:36 -07:00
2006-07-03 15:26:58 -07:00
2006-06-18 12:22:20 +01:00
2006-06-26 09:58:22 -07:00
2006-04-26 12:56:16 +01:00
2006-06-26 09:58:22 -07:00
2005-04-16 15:20:36 -07:00
2006-03-24 07:33:25 -08:00
2005-12-07 11:30:11 -08:00
2006-03-24 13:12:46 -08:00
2005-04-16 15:20:36 -07:00
2005-09-14 16:22:11 -07:00
2005-09-14 16:22:11 -07:00
2005-04-16 15:20:36 -07:00
2006-06-21 11:59:58 -07:00
2006-06-21 11:59:58 -07:00
2005-04-16 15:20:36 -07:00
2005-09-11 14:08:41 -07:00
2006-06-21 14:44:26 -07:00
2006-04-26 12:56:16 +01:00
2006-02-15 15:32:22 -08:00
2005-11-03 14:43:50 -08:00
2005-08-12 15:05:21 -07:00
2005-10-04 13:21:13 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-06-21 11:59:58 -07:00
2006-04-07 22:39:49 -07:00
2005-04-16 15:20:36 -07:00
2006-06-27 17:32:37 -07:00
2006-04-26 12:56:16 +01:00
2006-04-26 12:56:16 +01:00
2006-03-31 10:28:29 -08:00
2006-04-26 12:56:16 +01:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-09-08 14:57:25 -07:00
2006-07-03 15:27:00 -07:00
2005-04-16 15:20:36 -07:00
2005-05-18 16:14:30 -07:00
2006-04-26 12:56:16 +01:00
2006-06-21 14:50:10 -07:00
2006-03-25 08:22:56 -08:00
2005-04-16 15:20:36 -07:00
2006-04-26 12:56:16 +01:00
2005-04-16 15:20:36 -07:00
2006-04-26 12:56:16 +01:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-07-03 15:27:01 -07:00
2006-02-02 13:25:54 -08:00
2005-04-16 15:20:36 -07:00
2005-06-27 15:23:54 -07:00
2005-04-16 15:20:36 -07:00
2006-01-17 14:04:00 -08:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-05-01 08:59:08 -07:00
2006-07-02 13:58:47 -07:00
2006-04-26 12:56:16 +01:00
2006-06-29 16:58:06 -07:00
2005-04-16 15:20:36 -07:00
2005-10-04 13:21:13 -07:00
2005-09-10 10:06:21 -07:00
2006-01-08 20:14:02 -08:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-04-26 12:56:16 +01:00
2005-04-16 15:20:36 -07:00
2006-04-26 12:56:16 +01:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-07-03 15:27:11 -07:00
2006-02-15 13:37:04 -08:00
2006-04-26 12:56:16 +01:00
2006-04-26 12:56:16 +01:00
2006-06-27 17:32:45 -07:00
2005-09-05 00:05:48 -07:00
2005-09-29 08:46:27 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-06-21 18:46:18 -07:00
2006-06-23 07:42:53 -07:00
2005-09-11 14:09:34 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-06-22 15:05:58 -07:00
2005-04-16 15:20:36 -07:00