From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]:53548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730788AbeKGDX1 (ORCPT ); Tue, 6 Nov 2018 22:23:27 -0500 Date: Tue, 6 Nov 2018 12:56:52 -0500 From: Sasha Levin To: Paul Burton Cc: "stable@vger.kernel.org" , Greg Kroah-Hartman , Huacai Chen , Paul Burton , Ralf Baechle , James Hogan , "linux-mips@linux-mips.org" , Fuxin Zhang , Zhangjin Wu , Huacai Chen Subject: Re: [4.19 PATCH] MIPS: VDSO: Reduce VDSO_RANDOMIZE_SIZE to 64MB for 64bit Message-ID: <20181106175652.GF151445@sasha-vm> References: <20181105225815.24489-1-paul.burton@mips.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20181105225815.24489-1-paul.burton@mips.com> Sender: stable-owner@vger.kernel.org List-ID: On Mon, Nov 05, 2018 at 10:58:30PM +0000, Paul Burton wrote: >From: Huacai Chen > >[ 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 >Signed-off-by: Paul Burton >Fixes: ea7e0480a4b6 ("MIPS: VDSO: Always map near top of user memory") >Patchwork: https://patchwork.linux-mips.org/patch/20910/ >Cc: Ralf Baechle >Cc: James Hogan >Cc: linux-mips@linux-mips.org >Cc: Fuxin Zhang >Cc: Zhangjin Wu >Cc: Huacai Chen >Cc: stable@vger.kernel.org # 4.19 Now queued for 4.19, thank you. -- Thanks, Sasha