On Mon, Nov 05, 2018 at 10:58:30PM +0000, Paul Burton wrote:
From: Huacai Chen <chenhc@xxxxxxxxxx> [ 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@xxxxxxxxxx> Signed-off-by: Paul Burton <paul.burton@xxxxxxxx> Fixes: ea7e0480a4b6 ("MIPS: VDSO: Always map near top of user memory") Patchwork: https://patchwork.linux-mips.org/patch/20910/ Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx> Cc: James Hogan <jhogan@xxxxxxxxxx> Cc: linux-mips@xxxxxxxxxxxxxx Cc: Fuxin Zhang <zhangfx@xxxxxxxxxx> Cc: Zhangjin Wu <wuzhangjin@xxxxxxxxx> Cc: Huacai Chen <chenhuacai@xxxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx # 4.19
Now queued for 4.19, thank you. -- Thanks, Sasha