Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7107783rdb; Wed, 3 Jan 2024 05:05:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHBlH4qr+2i2OtlVJ841hA+3UpVizNallL5Eu7a3hJSrUI6+ElmaFg001J31aK5OvRK1v+N X-Received: by 2002:a50:a687:0:b0:553:7a3f:3d63 with SMTP id e7-20020a50a687000000b005537a3f3d63mr8802781edc.18.1704287152838; Wed, 03 Jan 2024 05:05:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704287152; cv=none; d=google.com; s=arc-20160816; b=T3uGaDHlbB3MrrbQkk26HZxAY1Ijsw6psq3N/OiGEVKr248QmlUooaDfda34EnZVm1 dLOunETzoMfO/kafwK8TAYROmXvZdkMWesE1h/p5JD57v/IWMEnN7ZoDhYcGufWrYAbh 2PRPi0DHO7k3gX/Wta1S36ZUImn5vFvUc73zKktWmHRL61aVpWmK9mlMs2nZVGFE2F/t bKEfxg9/AnpqH8rnDTyUIKxSy0bSPAwzeg+1CekHLG70AgEKBJBLDOAVKsFzRLI0jv2G GrgcFHOBPuPMYzaDLuyLkgaYpzgELob6P2/SN5S2yBiSZeclX/uuB+Ho0DtLjCQVNiYe KO1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=pGzJ3pIamCfAHwKHKyh5iFIjvKRVUsIH86gCTLZpLrQ=; fh=U9Xw46Yvik7SuZ3eMvnTMftWWwzspkw+p0ER04/hzgw=; b=pS0N1Av/b+1V50iSvRD8AvZRSrFDrolQGb6kurOrnfhVUMrxnXSuPrpwGCDIeGU686 Lpf4wCJAZQQ2zEAaiX18XrnL8odYyB2g8k6SqbyV7x/lo6Atm1rMZwpIKOhyTLL1sPSG jDvFK26xGS/w1udZVwZuh9CTgMOLwAFbKG5eVBv4GrmEB6tYLXzbXKJbqOkkpuo+jq3M jjkyH/6Ihes/5vRxZnfa4Idcw2AUjq9Ogi94jhj98aP0XkVf7QAWabY/8ULw74Hfv/bV sB0a3EuC/ip50Fp2MQw7NXNvet4upLEueupcxSyMJRXoWtgixn+hJzXSmANournWmA5I 02Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t1EAJyIS; spf=pass (google.com: domain of linux-kernel+bounces-15548-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15548-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x3-20020a50ba83000000b00553bb887471si12477838ede.342.2024.01.03.05.05.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 05:05:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15548-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=t1EAJyIS; spf=pass (google.com: domain of linux-kernel+bounces-15548-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15548-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8CF271F2322F for ; Wed, 3 Jan 2024 13:05:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB713199AD; Wed, 3 Jan 2024 13:05:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="t1EAJyIS" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 241A3199A2 for ; Wed, 3 Jan 2024 13:05:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D224C433C7; Wed, 3 Jan 2024 13:05:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704287143; bh=qy1B/hVtV9MM5lWSYrtrT8fgfP6SIBH1VGhcHFiT9yY=; h=From:To:Cc:Subject:Date:From; b=t1EAJyISncSnz5PGeFlyA9kbqbxPNviKX8PD5T4nilzclBHEpUmxRdW5+vxcxThP8 +R3U0j/shTqpfxy5IFw7drdbekMeUt9M5nfm2ijQuOnoB9MvGMxTnQ3jnAOQ8tTX9+ s5wNtB/17rJLyESY/2RXqHB5V9bu1kj2oBDUmd4n/HIBFvAodKc/VjuitS0U7/TQoU CjdzAkC5PKwlC9vgqGuMVrw64q1BfRgKn2IynBja3BYRIYC/nYJz57n1BBUnEDy5sA hhubRjLlCMkVyp98fBklxGS+mo5oqj+0QcO4uV9yLcwdN8LYeWJMiNeELz3hHF0zmE H0aBGvfH+ip7w== From: alexs@kernel.org To: Eric Biederman , Kees Cook , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Alex Shi , curlinhuang@tencent.com Subject: [PATCH] execve: argument list space enlargement Date: Wed, 3 Jan 2024 21:07:22 +0800 Message-ID: <20240103130722.1551670-1-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Alex Shi Wechat using too long gcc parameters, then get a strace complain: execve(...) = -1 E2BIG (Argument list too long) Have to increase the parameter space for this, stack has enough space for this enlargement. Signed-off-by: Alex Shi Cc: Alex Shi To: linux-kernel@vger.kernel.org To: linux-mm@kvack.org To: Kees Cook To: Eric Biederman --- include/uapi/linux/binfmts.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/binfmts.h b/include/uapi/linux/binfmts.h index c6f9450efc12..717f6cafe8dd 100644 --- a/include/uapi/linux/binfmts.h +++ b/include/uapi/linux/binfmts.h @@ -12,7 +12,7 @@ struct pt_regs; * prevent the kernel from being unduly impacted by misaddressed pointers. * MAX_ARG_STRINGS is chosen to fit in a signed 32-bit integer. */ -#define MAX_ARG_STRLEN (PAGE_SIZE * 32) +#define MAX_ARG_STRLEN (PAGE_SIZE * 128) #define MAX_ARG_STRINGS 0x7FFFFFFF /* sizeof(linux_binprm->buf) */ -- 2.43.0