s390/mm: mmap base does not depend on ADDR_NO_RANDOMIZE personality
authorAlexandre Ghiti <alex@ghiti.fr>
Thu, 4 Apr 2019 06:19:56 +0000 (02:19 -0400)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 4 Jun 2019 13:03:53 +0000 (15:03 +0200)
randomize_stack_top() checks for current task flag PF_RANDOMIZE in order
to use stack randomization and PF_RANDOMIZE is set when
ADDR_NO_RANDOMIZE is unset, so no need to check for ADDR_NO_RANDOMIZE
in stack_maxrandom_size.

[heiko.carstens@de.ibm.com]: See also commit 01578e36163c ("x86/elf:
Remove the unnecessary ADDR_NO_RANDOMIZE checks")

Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
arch/s390/mm/mmap.c

index 687f2a4d34590cc2fecfa1c5820e81776a7c786c..cbc718ba6d7876411a4fd0f48f5a8d8c722d9298 100644 (file)
@@ -24,8 +24,6 @@ static unsigned long stack_maxrandom_size(void)
 {
        if (!(current->flags & PF_RANDOMIZE))
                return 0;
-       if (current->personality & ADDR_NO_RANDOMIZE)
-               return 0;
        return STACK_RND_MASK << PAGE_SHIFT;
 }