]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
parisc: Allow mmap(MAP_STACK) memory to automatically expand upwards
authorHelge Deller <deller@kernel.org>
Sun, 8 Sep 2024 18:51:17 +0000 (20:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2024 10:00:53 +0000 (12:00 +0200)
commit348f2b824a47a0579a938eb8710b3a3cbd6a7a99
tree130730e5fb002a4cd0c9743eeee3b056ca68a409
parentdecde7c9fd1bf2e9b7e8c9f97b918e40123f88a3
parisc: Allow mmap(MAP_STACK) memory to automatically expand upwards

commit 5d698966fa7b452035c44c937d704910bf3440dd upstream.

When userspace allocates memory with mmap() in order to be used for stack,
allow this memory region to automatically expand upwards up until the
current maximum process stack size.
The fault handler checks if the VM_GROWSUP bit is set in the vm_flags field
of a memory area before it allows it to expand.
This patch modifies the parisc specific code only.
A RFC for a generic patch to modify mmap() for all architectures was sent
to the mailing list but did not get enough Acks.

Reported-by: Camm Maguire <camm@maguirefamily.org>
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # v5.10+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/parisc/include/asm/mman.h