x86: standardize mmap_rnd() usage
authorKees Cook <keescook@chromium.org>
Tue, 14 Apr 2015 22:47:45 +0000 (15:47 -0700)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Jun 2017 12:04:54 +0000 (14:04 +0200)
commit2d49a81a8a89b2a398e358fad5bb819f9d1f2528
treeebe5dbec0711c4cb95377e4b4d83313b13d6c22c
parent36805c5166899a5a013821d3e15b84409ae1ceb6
x86: standardize mmap_rnd() usage

commit 82168140bc4cec7ec9bad39705518541149ff8b7 upstream.

In preparation for splitting out ET_DYN ASLR, this refactors the use of
mmap_rnd() to be used similarly to arm, and extracts the checking of
PF_RANDOMIZE.

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Willy Tarreau <w@1wt.eu>
arch/x86/mm/mmap.c