From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752483AbdF3NYt (ORCPT ); Fri, 30 Jun 2017 09:24:49 -0400 Received: from mx2.suse.de ([195.135.220.15]:35129 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752440AbdF3NYs (ORCPT ); Fri, 30 Jun 2017 09:24:48 -0400 Date: Fri, 30 Jun 2017 15:24:39 +0200 From: Michal Hocko To: Linus Torvalds Cc: Oleg Nesterov , Hugh Dickins , Andrew Morton , Larry Woodman , Linux Kernel Mailing List Subject: Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev Message-ID: <20170630132439.GL22917@dhcp22.suse.cz> References: <20170628175237.GA24868@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 28-06-17 16:26:33, Linus Torvalds wrote: [...] > In fact, I'd even be quite open to adding a kernel warning about badly > behaved binaries that grow their stack by a big amount in one go. Not > only is it bad taste (and we really should encourage compilers to do > probing every page when growing the stack), but it migth be a sign of > an attempted attack. FWIW our gcc guys shown an interest in having something to tell the kernel how much the stack can grow at once. They want it for testing of the new stack probing alloca implementation. I have something preliminary with /proc//stack_expand_limit for the internal testing purpose but maybe there will be more interest for this. I didn't plan to post it public because it basically duplicates the stack_gap but it is also true that it can help some applications which won't use the proposed __save_alloca (or whatever it will be) without increasing stack_gap too much. What do you think? -- Michal Hocko SUSE Labs