]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
mm: ASLR: use get_random_long()
authorDaniel Cashman <dcashman@android.com>
Fri, 26 Feb 2016 23:19:37 +0000 (15:19 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 27 Feb 2016 18:28:52 +0000 (10:28 -0800)
commit5ef11c35ce86b94bfb878b684de4cdaf96f54b2f
tree1ebed2840d0640a3f00b71709695cacee96c7688
parentec9ee4acd97c0039a61c0ae4f12705767ae62153
mm: ASLR: use get_random_long()

Replace calls to get_random_int() followed by a cast to (unsigned long)
with calls to get_random_long().  Also address shifting bug which, in
case of x86 removed entropy mask for mmap_rnd_bits values > 31 bits.

Signed-off-by: Daniel Cashman <dcashman@android.com>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: David S. Miller <davem@davemloft.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Nick Kralevich <nnk@google.com>
Cc: Jeff Vander Stoep <jeffv@google.com>
Cc: Mark Salyzyn <salyzyn@android.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/arm/mm/mmap.c
arch/arm64/mm/mmap.c
arch/mips/mm/mmap.c
arch/powerpc/kernel/process.c
arch/powerpc/mm/mmap.c
arch/sparc/kernel/sys_sparc_64.c
arch/x86/mm/mmap.c
fs/binfmt_elf.c