From: KOSAKI Motohiro Subject: Re: [PATCH 2/2] execve: check the VM has enough memory at first Date: Tue, 14 Sep 2010 10:52:45 +0900 (JST) Message-ID: <20100914105147.C996.A69D9226@jp.fujitsu.com> References: <20100909140439.C945.A69D9226@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Cc: kosaki.motohiro@jp.fujitsu.com, Roland McGrath , Andrew Morton , linux-kernel@vger.kernel.org, oss-security@lists.openwall.com, Solar Designer , Kees Cook , Al Viro , Oleg Nesterov , Neil Horman , linux-fsdevel@vger.kernel.org, pageexec@freemail.hu, "Brad Spengler , Eugene Teo" , KAMEZAWA Hiroyuki To: Linus Torvalds Return-path: Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:50811 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751917Ab0INBws (ORCPT ); Mon, 13 Sep 2010 21:52:48 -0400 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > On Wed, Sep 8, 2010 at 10:04 PM, KOSAKI Motohiro > wrote: > > > > After this patch, execve() expand stack at first and receive to > > check vm_enough_memory() properly. then, too long argument of > > execve() than the machine memory return EFAULT properly. > > This is horrible. We don't want to walk the arguments one more time > just for this. Let's just improve the checks that we do as we go > along. > > Linus Okey. I'll consider new way in this night.