summaryrefslogtreecommitdiff
path: root/arch/parisc/Kconfig
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2023-11-13 13:12:57 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-11-16 02:30:09 +0300
commit5f74f820f6fc844b95f9e5e406e0a07d97510420 (patch)
tree852011007780addec07154b8463f69f9b9dcefea /arch/parisc/Kconfig
parent13b2a4b22e98ff80b888a160a2acd92d81b05925 (diff)
downloadlinux-5f74f820f6fc844b95f9e5e406e0a07d97510420.tar.xz
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 <deller@gmx.de> Reported-by: matoro <matoro_mailinglist_kernel@matoro.tk> Tested-by: matoro <matoro_mailinglist_kernel@matoro.tk> Cc: <stable@vger.kernel.org> [6.6+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'arch/parisc/Kconfig')
-rw-r--r--arch/parisc/Kconfig6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index fd69dfa0cdab..a7c9c0e69e5a 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -140,11 +140,11 @@ config ARCH_MMAP_RND_COMPAT_BITS_MIN
default 8
config ARCH_MMAP_RND_BITS_MAX
- default 24 if 64BIT
- default 17
+ default 18 if 64BIT
+ default 13
config ARCH_MMAP_RND_COMPAT_BITS_MAX
- default 17
+ default 13
# unless you want to implement ACPI on PA-RISC ... ;-)
config PM