diff options
author | Huacai Chen <chenhc@lemote.com> | 2018-11-05 22:58:30 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-13 11:08:14 -0800 |
commit | 085d695911bebb8eaa16acf57ad012a7c00cc6ff (patch) | |
tree | 979869dbf1ded8fe48d89ffed269c2d084e18bc4 /drivers/gpio | |
parent | d93080cdba60ec99db81f1c96d4b8dd8f0c3d7f9 (diff) | |
download | linux-stable-085d695911bebb8eaa16acf57ad012a7c00cc6ff.tar.gz linux-stable-085d695911bebb8eaa16acf57ad012a7c00cc6ff.tar.bz2 linux-stable-085d695911bebb8eaa16acf57ad012a7c00cc6ff.zip |
MIPS: VDSO: Reduce VDSO_RANDOMIZE_SIZE to 64MB for 64bit
[ Upstream commit c61c7def1fa0a722610d89790e0255b74f3c07dd ]
Commit ea7e0480a4b6 ("MIPS: VDSO: Always map near top of user memory")
set VDSO_RANDOMIZE_SIZE to 256MB for 64bit kernel. But take a look at
arch/mips/mm/mmap.c we can see that MIN_GAP is 128MB, which means the
mmap_base may be at (user_address_top - 128MB). This make the stack be
surrounded by mmaped areas, then stack expanding fails and causes a
segmentation fault. Therefore, VDSO_RANDOMIZE_SIZE should be less than
MIN_GAP and this patch reduce it to 64MB.
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Fixes: ea7e0480a4b6 ("MIPS: VDSO: Always map near top of user memory")
Patchwork: https://patchwork.linux-mips.org/patch/20910/
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@linux-mips.org
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Cc: Huacai Chen <chenhuacai@gmail.com>
Cc: stable@vger.kernel.org # 4.19
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpio')
0 files changed, 0 insertions, 0 deletions