From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1FF0386423 for ; Tue, 18 Aug 2026 23:17:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787095052; cv=none; b=Q6qTnc8CE9FfMCCI0xCRI0b5NBHkkE9L9RbCOY+Bx7kT3ILywI6vZ7QEco9mzGUWvGYZCTF0cVq/oprEA/Cu37AWEA/x4nbOKIcqUAYlEnXyUtbwrdy4Yz0AjYJkhCtnq1JSuXDlyUqfiYun1wwLspaznzot+AGw5WyEfiMCPLU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787095052; c=relaxed/simple; bh=vU6FrvWE607k5Xzh7SdBC7CeruR6Eky4BvR/CT7/VBA=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=jxrUDxJaCorn58XmO2EJp/eiuKyE4HPh1Py7Tc/+oEwYpYsQR7b2FskkXlMFH59msC6bXjPHM7A+zG/mlLhxwqptVF3v5g1m4w8sGTFIzsJV7uj6e7iw2yctPe5CHPI4GxUVdYd/kheXLd8O8Q319GQfQ5FCvC+hE34liBrMo4M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--wfelipe.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=CAbgUXvx; arc=none smtp.client-ip=209.85.210.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--wfelipe.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="CAbgUXvx" Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-84859a64079so682513b3a.3 for ; Tue, 18 Aug 2026 16:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1787095050; x=1787699850; darn=vger.kernel.org; h=content-transfer-encoding:content-type:cc:to:from:subject :message-id:references:mime-version:in-reply-to:date:from:to:cc :subject:date:message-id:reply-to:content-type; bh=isOvqMF/5WA0EHYdsGtLtHCnG1u9xSNeKPU4MxGk99M=; b=CAbgUXvxTpNuxY+eyi6HCcnOmFUxIfc7K1tUDQw1U6bFF66oO3TMq3xA+HFKl7WlN9 NVtUPuOgcpGpXuuoZKSqBB+bwwScGKXKc4mJsOl5BqHv0oAkmFUXigouylNwW1f4DNWF wNfEoDfyQ4b0yIhr1PblQ3DeAvCMJJZYdxjNe3nU5gKg60o5Z4SNHaUgr1WHPrxW5K5V dOhZ3EkyB15W+LFWJeddZM/zhR6sM2/jBRSKL/EMS1gIXV+2djtDk97ztkYOxhQeaK2V zcs3hlZmWXB4+lcKH4qeeI7ApGgJ+rS6dUOfsawv7YTkj8ySIp5fG7/x3Yf13l9/BV+S Wwkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787095050; x=1787699850; h=content-transfer-encoding:content-type:cc:to:from:subject :message-id:references:mime-version:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=isOvqMF/5WA0EHYdsGtLtHCnG1u9xSNeKPU4MxGk99M=; b=Md8c6pbbLO1Kszp3c3qOtzh5cW3xEtgwhICAsb6COTBJzYup+ZRe13GaBRHOg6jQFi 5Xgtr9w65IN/rtw11TboQdoNppFMqXPCFGOFe8rJX4rZ9hAfYQQ17qVP5k/SfZ+Ey6gc SsISS+AmDx7zdvt5G8UICPQu9/Z9B9zEJtz4Nn10QeNY/n/egj4CNBNVB8ZIb7A02SW6 tMY921En++z6f2pqxfWpNxZRDiH8uwwhjygR+MNekC2ujt4vpEaLTJ6CgTrURUc7SXXe sstzPSqTNACu2HKjT+BIhdgKwWSXQ+A8vTm2YiLpZky6wU4VyCpN/zDtCmt+sio/CbMV HavQ== X-Forwarded-Encrypted: i=1; AHgh+RqcfJqSqw2L5oEBTKloPlmzWdykQybl17lT9JinHtjisBJd1X28lXOKlw24N6W3YXh6so9rxLU4SmhMfZw=@vger.kernel.org X-Gm-Message-State: AOJu0Yw/Aafn4AwF1bz8RM3mFfpf0FpfPX0eAl1qZztU9ChndRABkMtU +H+Wawi/p4n8U/ansdadcr+5inrWzGaMkvXGuCyxTytGxwXwteLkKK+LrRlLiIUIT3nb53aWiC8 RupcVOxCF8w== X-Received: from pfblb8.prod.google.com ([2002:a05:6a00:4f08:b0:845:4da8:56a5]) (user=wfelipe job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:23c3:b0:848:3f07:c5a2 with SMTP id d2e1a72fcca58-851d38399c0mr327599b3a.4.1787095050148; Tue, 18 Aug 2026 16:17:30 -0700 (PDT) Date: Tue, 18 Aug 2026 23:16:33 +0000 In-Reply-To: <20260818231646.804507-1-wfelipe@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260818231646.804507-1-wfelipe@google.com> X-Mailer: git-send-email 2.55.0.737.g08866a6d13-goog Message-ID: <20260818231646.804507-3-wfelipe@google.com> Subject: [PATCH v2 2/2] init/Kconfig: make config INIT_ENV_ARG_LIMIT user-configurable From: Wilson Felipe Pereira To: Andrew Morton , Arnd Bergmann Cc: "=?UTF-8?q?Maciej=20=C5=BBenczykowski?=" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , linux-arch@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Wilson Felipe Pereira Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable INIT_ENV_ARG_LIMIT is defined without a prompt string (`int`), making it a hidden Kconfig symbol that defaults to 32 (or 128 for UML) and cannot be configured in `make menuconfig`. Now that CONFIG_COMMAND_LINE_SIZE is configurable across all architectures, users who select larger kernel command lines (e.g., 4096 bytes) may pass more than 32 command-line arguments or environment variables (`foo=3Dbar`) = to `/sbin/init`. If INIT_ENV_ARG_LIMIT remains hardcoded at 32, any argument after the 32nd sets the panic_later flag and causes a hard kernel panic on boot. Add a prompt string ("Maximum number of kernel command line arguments") and a `range 32 4096` to `config INIT_ENV_ARG_LIMIT` so that users can configure their init argument and environment variable limit when needed, while preserving the existing default of 32 for standard builds. Signed-off-by: Maciej =C5=BBenczykowski Signed-off-by: Wilson Felipe Pereira --- init/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init/Kconfig b/init/Kconfig index d03d42ecb0e9..bdd66dc7f628 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -231,9 +231,10 @@ config BROKEN_ON_SMP default y =20 config INIT_ENV_ARG_LIMIT - int + int "Maximum number of kernel command line arguments" default 32 if !UML default 128 if UML + range 32 4096 help Maximum of each of the number of arguments and environment variables passed to init from the kernel command line. --=20 2.55.0.737.g08866a6d13-goog