s390: limit brk randomization to 32MB
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 4 Mar 2019 11:33:28 +0000 (12:33 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 6 Mar 2019 08:34:03 +0000 (09:34 +0100)
commitcd479eccd2e057116d504852814402a1e68ead80
tree4907bc92b607d86fe8b86a21657d85d7186b3f7d
parent3717f613f48df0222311f974cf8a06c8a6c97bae
s390: limit brk randomization to 32MB

For a 64-bit process the randomization of the program break is quite
large with 1GB. That is as big as the randomization of the anonymous
mapping base, for a test case started with '/lib/ld64.so.1 <exec>'
it can happen that the heap is placed after the stack. To avoid
this limit the program break randomization to 32MB for 64-bit and
keep 8MB for 31-bit.

Reported-by: Stefan Liebler <stli@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/elf.h