From 3130514bd99bdc4cf8a51e24be2d8bf6f1e47f62 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 22 Apr 2018 01:55:38 +0200 Subject: exec: Leave room for mmaps etc. before PIE binaries otherwise there might not even be enough room to run RPCs during rtld bootstrap. * exec/exec.c (do_exec): Add 128MiB to anywhere_start before loading program. --- exec/exec.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'exec/exec.c') diff --git a/exec/exec.c b/exec/exec.c index ccf7bb36..3b4978d2 100644 --- a/exec/exec.c +++ b/exec/exec.c @@ -1285,6 +1285,9 @@ do_exec (file_t file, } + /* Leave room for mmaps etc. before PIE binaries. + * Could add address randomization here. */ + anywhere_start += 128 << 20; /* Load the file into the task. */ anywhere_start = load (newtask, &e, anywhere_start); if (e.error) -- cgit v1.2.3