Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5849212imu; Tue, 13 Nov 2018 12:43:46 -0800 (PST) X-Google-Smtp-Source: AJdET5e4InrRYo2dvahpNEQ90WuvD4lNwrx/7gc88hFI/WwSQH/LNprcTipCqYI9cxOB6SfvU/6C X-Received: by 2002:a62:d084:: with SMTP id p126-v6mr6968363pfg.147.1542141826840; Tue, 13 Nov 2018 12:43:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542141826; cv=none; d=google.com; s=arc-20160816; b=QPdBz9Fjoc0YDN8bVWY3ic5aHte4wHZKfTKSIh8cYeTHYt/PRbOt83CB6rQ4b9niCG PS0SkulJObu4adgzrttE0eLtaHNTabR+YdJmL5dBS2E5EA+b69TNd/KjPXgstWtWFqTv Ad3pxyzu15KE2okEadDqgpM8NjAXH9SmCheb3iOlMk4wO0ZPGUHzr8Iw8qCTkcDogKbd 8KeUaldIWXs9IDM22rPZ2zDmnJTf/vejcy7DFYrlkLFj566qq5Kv7hIkTydy1AR62LEt 2O7/WDUR65ETavfDXjUcjb6o6t7JY3Qml+fPsu5FDVauC5WF2oMkpET73w2AMlpgsOMt f7/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=vh7GaHb/qBdhk64HNVgvK1b2tIazsbv5WFQLQUrmeP8=; b=LOxUNlaVp/U6HfNdIX/PampCAry2A0hvVdE8H0euWaD5mglZZZrv5soh9s727M0bpD LGz3lwdhcDzLEo4BhBImsJbmX/fH1X+YGGeh9mKEDUhPaR9yfH/XSBm3tndN4zc9eGdy MMldWyVdr5cgkUc0zqDrUiXPMdH3A7yjgdFepgPIlgfbHVOA5JNX4vXCO4oBp7bcLVeS PsbxvynZDf8eZDuFY+EFrI7WHk9r4VFfo/s9kXOEGsWDBogGo7HzKaUcxBfnJt51j6cB RmdFkGvVPi1aWQ5epAzf4mctPHyVPbhqhfkRcsXnAuvz5COEZelCE2D5ouCSa7zSnR9I nEOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w187-v6si19160698pfb.8.2018.11.13.12.43.31; Tue, 13 Nov 2018 12:43:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727094AbeKNGm6 (ORCPT + 99 others); Wed, 14 Nov 2018 01:42:58 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:41304 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725748AbeKNGm6 (ORCPT ); Wed, 14 Nov 2018 01:42:58 -0500 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3F3367F6; Tue, 13 Nov 2018 20:43:06 +0000 (UTC) Date: Tue, 13 Nov 2018 12:43:05 -0800 From: Andrew Morton To: Oleg Nesterov Cc: Ben Woodard , "Eric W. Biederman" , Kees Cook , Michal Hocko , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] exec: increase BINPRM_BUF_SIZE to 256 Message-Id: <20181113124305.73b8ac9e5a2ef9b18d3444b2@linux-foundation.org> In-Reply-To: <20181113165557.GG30990@redhat.com> References: <20181112160931.GA28463@redhat.com> <20181112160956.GA28472@redhat.com> <20181112155248.4dde2613979f4c176565629e@linux-foundation.org> <20181113165557.GG30990@redhat.com> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 13 Nov 2018 17:55:58 +0100 Oleg Nesterov wrote: > > However it would be basically cost-free to increase > > BINPRM_BUF_SIZE up to the point where sizeof(struct linux_binprm) == > > PAGE_SIZE? > > I don't think we should take sizeof(struct linux_binprm) into account, the > new members can come at any time and we can never decrease BINPRM_BUF_SIZE. My main point is.. why not make BINPRM_BUF_SIZE a lot larger than 256?