From nobody Fri Dec 26 15:22:03 2025 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) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="t1EAJyIS" 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: quoted-printable Content-Type: text/plain; charset="utf-8" From: Alex Shi Wechat using too long gcc parameters, then get a strace complain: execve(...) =3D -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 =20 /* sizeof(linux_binprm->buf) */ --=20 2.43.0