diff options
| author | Helge Deller <[email protected]> | 2023-11-13 11:12:57 +0100 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-11-15 15:30:09 -0800 |
| commit | 5f74f820f6fc844b95f9e5e406e0a07d97510420 (patch) | |
| tree | 852011007780addec07154b8463f69f9b9dcefea /arch/parisc/include/asm/processor.h | |
| parent | 13b2a4b22e98ff80b888a160a2acd92d81b05925 (diff) | |
parisc: fix mmap_base calculation when stack grows upwards
Matoro reported various userspace crashes on the parisc platform with kernel
6.6 and bisected it to commit 3033cd430768 ("parisc: Use generic mmap top-down
layout and brk randomization").
That commit switched parisc to use the common infrastructure to calculate
mmap_base, but missed that the mmap_base() function takes care for
architectures where the stack grows downwards only.
Fix the mmap_base() calculation to include the stack-grows-upwards case
and thus fix the userspace crashes on parisc.
Link: https://lkml.kernel.org/r/ZVH2qeS1bG7/1J/l@p100
Fixes: 3033cd430768 ("parisc: Use generic mmap top-down layout and brk randomization")
Signed-off-by: Helge Deller <[email protected]>
Reported-by: matoro <[email protected]>
Tested-by: matoro <[email protected]>
Cc: <[email protected]> [6.6+]
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'arch/parisc/include/asm/processor.h')
| -rw-r--r-- | arch/parisc/include/asm/processor.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/parisc/include/asm/processor.h b/arch/parisc/include/asm/processor.h index c05d121cf5d0..982aca20f56f 100644 --- a/arch/parisc/include/asm/processor.h +++ b/arch/parisc/include/asm/processor.h @@ -47,6 +47,8 @@ #ifndef __ASSEMBLY__ +struct rlimit; +unsigned long mmap_upper_limit(struct rlimit *rlim_stack); unsigned long calc_max_stack_size(unsigned long stack_max); /* |