diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-09-19 07:43:13 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-09-19 07:43:13 +0200 |
commit | 54450af662369efbd4cb438ce7b553dfffa00f07 (patch) | |
tree | 8daff4143c7dfcb245eb532fbd31acef54813f04 /fs/exec.c | |
parent | 932d2d1fcb2bbbc3cb30a762302a5d2eac7720bb (diff) | |
parent | 5d698966fa7b452035c44c937d704910bf3440dd (diff) |
Merge tag 'parisc-for-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc architecture updates from Helge Deller:
- On parisc we now use the generic clockevent framework for timekeeping
- Although there is no 64-bit glibc/userspace for parisc yet, for
testing purposes one can run statically linked 64-bit binaries. This
patchset contains two patches which fix 64-bit userspace which has
been broken since kernel 4.19
- Fix the userspace stack position and size when the ADDR_NO_RANDOMIZE
personality is enabled
- On other architectures mmap(MAP_GROWSDOWN | MAP_STACK) creates a
downward-growing stack. On parisc mmap(MAP_STACK) is now sufficient
to create an upward-growing stack
* tag 'parisc-for-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: Allow mmap(MAP_STACK) memory to automatically expand upwards
parisc: Use PRIV_USER instead of hardcoded value
parisc: Fix itlb miss handler for 64-bit programs
parisc: Fix 64-bit userspace syscall path
parisc: Fix stack start for ADDR_NO_RANDOMIZE personality
parisc: Convert to generic clockevents
parisc: pdc_stable: Constify struct kobj_type
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c index caae051c5a95..dad402d55681 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -811,7 +811,8 @@ int setup_arg_pages(struct linux_binprm *bprm, stack_base = calc_max_stack_size(stack_base); /* Add space for stack randomization. */ - stack_base += (STACK_RND_MASK << PAGE_SHIFT); + if (current->flags & PF_RANDOMIZE) + 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) |