]> git.baikalelectronics.ru Git - kernel.git/commit
s390/mm: align 64-bit PIE binaries to 4GB
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 12 Feb 2015 13:17:52 +0000 (14:17 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 19 Feb 2015 09:36:32 +0000 (10:36 +0100)
commit7d4ce97483d49046e13ce1f09d90bc0768e107ce
tree4677a713c51bc3429ab7292a73c2d49cb382015a
parent295b5133260736a18940108573c1c962de383aeb
s390/mm: align 64-bit PIE binaries to 4GB

The base address (STACK_TOP / 3 * 2) for a 64-bit program is two thirds
into the 4GB segment at 0x2aa00000000. The randomization added on z13
can eat another 1GB of the remaining 1.33GB to the next 4GB boundary.
In the worst case 300MB are left for the executable + bss which may
cross into the next 4GB segment. This is bad for branch prediction,
therefore align the base address to 4GB to give the program more room
before it crosses the 4GB boundary.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/mmap.c