1
0
Fork 0

s390/mm: mmap base does not depend on ADDR_NO_RANDOMIZE personality

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 01578e3616 ("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>
alistair/sunxi64-5.4-dsi
Alexandre Ghiti 2019-04-04 02:19:56 -04:00 committed by Heiko Carstens
parent 8b96d9712a
commit 567b722347
1 changed files with 0 additions and 2 deletions

View 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;
}