diff options
| author | Ingo Molnar <mingo@kernel.org> | 2015-05-17 07:57:31 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2015-05-17 07:57:31 +0200 |
| commit | 75d95d84888cbd0024eb62ca7e72b3f7fe67dbdd (patch) | |
| tree | 7167fa30a5c46766c10c4b9a37d7bf9373c26c6d /fs/exec.c | |
| parent | 52648e83c9a6b9f7fc3dd272d4d10175e93aa62a (diff) | |
| parent | c0655fe9b0901a968800f56687be3c62b4cce5d2 (diff) | |
Merge branch 'linus' into x86/asm, to resolve conflicts
Conflicts:
tools/testing/selftests/x86/Makefile
tools/testing/selftests/x86/run_x86_tests.sh
Diffstat (limited to 'fs/exec.c')
| -rw-r--r-- | fs/exec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/exec.c b/fs/exec.c index 49a1c61433b7..1977c2a553ac 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -659,6 +659,9 @@ int setup_arg_pages(struct linux_binprm *bprm, if (stack_base > STACK_SIZE_MAX) stack_base = STACK_SIZE_MAX; + /* Add space for stack randomization. */ + stack_base += (STACK_RND_MASK << PAGE_SHIFT); + /* Make sure we didn't let the argument array grow too large. */ if (vma->vm_end - vma->vm_start > stack_base) return -ENOMEM; |
