From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752646Ab0INBwu (ORCPT ); Mon, 13 Sep 2010 21:52:50 -0400 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 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 From: KOSAKI Motohiro To: Linus Torvalds Subject: Re: [PATCH 2/2] execve: check the VM has enough memory at first 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 In-Reply-To: References: <20100909140439.C945.A69D9226@jp.fujitsu.com> Message-Id: <20100914105147.C996.A69D9226@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.50.07 [ja] Date: Tue, 14 Sep 2010 10:52:45 +0900 (JST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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.