diff options
Diffstat (limited to 'arch/arm/mm/mmap.c')
| -rw-r--r-- | arch/arm/mm/mmap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c index afe209e1e1f8..74be05f3e03a 100644 --- a/arch/arm/mm/mmap.c +++ b/arch/arm/mm/mmap.c | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #include <linux/shm.h> | 7 | #include <linux/shm.h> |
| 8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
| 9 | #include <linux/io.h> | 9 | #include <linux/io.h> |
| 10 | #include <linux/personality.h> | ||
| 10 | #include <linux/random.h> | 11 | #include <linux/random.h> |
| 11 | #include <asm/cputype.h> | 12 | #include <asm/cputype.h> |
| 12 | #include <asm/system.h> | 13 | #include <asm/system.h> |
| @@ -82,7 +83,8 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, | |||
| 82 | mm->cached_hole_size = 0; | 83 | mm->cached_hole_size = 0; |
| 83 | } | 84 | } |
| 84 | /* 8 bits of randomness in 20 address space bits */ | 85 | /* 8 bits of randomness in 20 address space bits */ |
| 85 | if (current->flags & PF_RANDOMIZE) | 86 | if ((current->flags & PF_RANDOMIZE) && |
| 87 | !(current->personality & ADDR_NO_RANDOMIZE)) | ||
| 86 | addr += (get_random_int() % (1 << 8)) << PAGE_SHIFT; | 88 | addr += (get_random_int() % (1 << 8)) << PAGE_SHIFT; |
| 87 | 89 | ||
| 88 | full_search: | 90 | full_search: |
