]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
mmap: arch_get_unmapped_area(): use proper mmap base for bottom up direction
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 12 Nov 2013 23:07:54 +0000 (15:07 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 13 Nov 2013 03:09:08 +0000 (12:09 +0900)
commit4e99b02131b280b064d30a5926ef1c4763f3097b
tree04469d0d3530e7675b3962dad5de614a6f88292b
parentb349acc76b7f65400b85abd09a5379ddd6fa5a97
mmap: arch_get_unmapped_area(): use proper mmap base for bottom up direction

This is more or less the generic variant of commit 41aacc1eea64 ("x86
get_unmapped_area: Access mmap_legacy_base through mm_struct member").

So effectively architectures which use an own arch_pick_mmap_layout()
implementation but call the generic arch_get_unmapped_area() now can
also randomize their mmap_base.

All architectures which have an own arch_pick_mmap_layout() and call the
generic arch_get_unmapped_area() (arm64, s390, tile) currently set
mmap_base to TASK_UNMAPPED_BASE.  This is also true for the generic
arch_pick_mmap_layout() function.  So this change is a no-op currently.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Radu Caragea <sinaelgl@gmail.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/mmap.c