diff options
author | Helge Deller <deller@gmx.de> | 2023-08-19 00:53:28 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2023-08-22 10:24:46 +0200 |
commit | 3033cd4307681c60db6d08f398a64484b36e0b0f (patch) | |
tree | 41a33f799e22aef056f347b382a1630a268bfe6e /arch/parisc/kernel/process.c | |
parent | 9f5ba4b3e1b3c123eeca5d2d09161e8720048b5c (diff) |
parisc: Use generic mmap top-down layout and brk randomization
parisc uses a top-down layout by default that exactly fits the generic
functions, so get rid of arch specific code and use the generic version
by selecting ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT.
Note that on parisc the stack always grows up and a "unlimited stack"
simply means that the value as defined in CONFIG_STACK_MAX_DEFAULT_SIZE_MB
should be used. So RLIM_INFINITY is not an indicator to use the legacy
memory layout.
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/kernel/process.c')
-rw-r--r-- | arch/parisc/kernel/process.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 62f9b14c6406..ed93bd8c1545 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c @@ -278,17 +278,3 @@ __get_wchan(struct task_struct *p) } while (count++ < MAX_UNWIND_ENTRIES); return 0; } - -static inline unsigned long brk_rnd(void) -{ - return (get_random_u32() & BRK_RND_MASK) << PAGE_SHIFT; -} - -unsigned long arch_randomize_brk(struct mm_struct *mm) -{ - unsigned long ret = PAGE_ALIGN(mm->brk + brk_rnd()); - - if (ret < mm->brk) - return mm->brk; - return ret; -} |