Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] freepgt: arm FIRST_USER_ADDRESS PAGE_SIZE

ARM define FIRST_USER_ADDRESS as PAGE_SIZE (beyond the machine vectors when
they are mapped low), and use that definition in place of locally defined
MIN_MAP_ADDR.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Hugh Dickins and committed by
Linus Torvalds
6119be0b 8462e201

+9 -9
+2 -9
arch/arm/kernel/sys_arm.c
··· 51 51 return error; 52 52 } 53 53 54 - /* 55 - * This is the lowest virtual address we can permit any user space 56 - * mapping to be mapped at. This is particularly important for 57 - * non-high vector CPUs. 58 - */ 59 - #define MIN_MAP_ADDR (PAGE_SIZE) 60 - 61 54 /* common code for old and new mmaps */ 62 55 inline long do_mmap2( 63 56 unsigned long addr, unsigned long len, ··· 62 69 63 70 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); 64 71 65 - if (flags & MAP_FIXED && addr < MIN_MAP_ADDR) 72 + if (flags & MAP_FIXED && addr < FIRST_USER_ADDRESS) 66 73 goto out; 67 74 68 75 error = -EBADF; ··· 115 122 { 116 123 unsigned long ret = -EINVAL; 117 124 118 - if (flags & MREMAP_FIXED && new_addr < MIN_MAP_ADDR) 125 + if (flags & MREMAP_FIXED && new_addr < FIRST_USER_ADDRESS) 119 126 goto out; 120 127 121 128 down_write(&current->mm->mmap_sem);
+7
include/asm-arm/pgtable.h
··· 102 102 #define PGDIR_SIZE (1UL << PGDIR_SHIFT) 103 103 #define PGDIR_MASK (~(PGDIR_SIZE-1)) 104 104 105 + /* 106 + * This is the lowest virtual address we can permit any user space 107 + * mapping to be mapped at. This is particularly important for 108 + * non-high vector CPUs. 109 + */ 110 + #define FIRST_USER_ADDRESS PAGE_SIZE 111 + 105 112 #define FIRST_USER_PGD_NR 1 106 113 #define USER_PTRS_PER_PGD ((TASK_SIZE/PGDIR_SIZE) - FIRST_USER_PGD_NR) 107 114