diff options
author | Tony Lindgren <tony@atomide.com> | 2010-08-04 14:43:45 +0300 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-08-04 14:43:45 +0300 |
commit | 7590d1defdc720a97a9e186f45f529c4ae1b40f7 (patch) | |
tree | e7ffdc043a2847f410d654d8e99e001f3138937a /arch/arm/mm/mmap.c | |
parent | 7e788b4289bb025a96e327c604cb2db92e17108f (diff) | |
parent | 869fef41547db95df8523bf67845a21313709428 (diff) | |
download | blackbird-op-linux-7590d1defdc720a97a9e186f45f529c4ae1b40f7.tar.gz blackbird-op-linux-7590d1defdc720a97a9e186f45f529c4ae1b40f7.zip |
Merge branch 'devel-map-io' into omap-for-linus
Diffstat (limited to 'arch/arm/mm/mmap.c')
-rw-r--r-- | arch/arm/mm/mmap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c index f5abc51c5a07..4f5b39687df5 100644 --- a/arch/arm/mm/mmap.c +++ b/arch/arm/mm/mmap.c @@ -7,6 +7,7 @@ #include <linux/shm.h> #include <linux/sched.h> #include <linux/io.h> +#include <linux/random.h> #include <asm/cputype.h> #include <asm/system.h> @@ -80,6 +81,9 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, start_addr = addr = TASK_UNMAPPED_BASE; mm->cached_hole_size = 0; } + /* 8 bits of randomness in 20 address space bits */ + if (current->flags & PF_RANDOMIZE) + addr += (get_random_int() % (1 << 8)) << PAGE_SHIFT; full_search: if (do_align) |