Skip to content

[PW_SID:1141196] init/Kconfig: generalize config COMMAND_LINE_SIZE - #2420

Open
linux-riscv-bot wants to merge 4 commits into
workflow__riscv__fixesfrom
pw1141196
Open

[PW_SID:1141196] init/Kconfig: generalize config COMMAND_LINE_SIZE#2420
linux-riscv-bot wants to merge 4 commits into
workflow__riscv__fixesfrom
pw1141196

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 1141196 applied to workflow__riscv__fixes

Name: init/Kconfig: generalize config COMMAND_LINE_SIZE
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1141196
Version: 1

Linux RISC-V bot and others added 4 commits August 4, 2026 02:48
Currently, only s390 has the ability to configure the maximum kernel
command line size via Kconfig (CONFIG_COMMAND_LINE_SIZE). Other
architectures define a hardcoded COMMAND_LINE_SIZE macro in their setup.sh
headers.

In some use cases, such as netboot kernels, rootfs configurations, larger
initramfs setups, require larger sizes. While for embedded workloads, it
can be reduced to save memory.

Move config COMMAND_LINE_SIZE out of arch/s390/Kconfig and into
init/Kconfig under General setup so that all architectures can configure
their maximum command line length. The default values were added to keep
the values unchanged.

Originally-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Wilson Felipe Pereira <wfelipe@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Now that CONFIG_COMMAND_LINE_SIZE is available in init/Kconfig for all
architectures, update every architecture's setup.h header to define
COMMAND_LINE_SIZE as CONFIG_COMMAND_LINE_SIZE.

For user-space API (uapi) headers, wrap the definition in an
`#ifdef __KERNEL__` guard and retain the historical hardcoded default in
the `#else` block. When user-space headers are installed via
`make headers_install`, unifdef strips out the kernel section, ensuring
same value as before for user-space applications including `<asm/setup.h>`.

Originally-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Wilson Felipe Pereira <wfelipe@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
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=bar`) to
`/sbin/init`. If INIT_ENV_ARG_LIMIT remains hardcoded at 32, any argument
after the 32nd is silently dropped when the kernel executes init.

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.

Originally-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Wilson Felipe Pereira <wfelipe@google.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] init/Kconfig: generalize config COMMAND_LINE_SIZE to all architectures"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 117.30 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] init/Kconfig: generalize config COMMAND_LINE_SIZE to all architectures"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1139.97 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] init/Kconfig: generalize config COMMAND_LINE_SIZE to all architectures"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1444.96 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] init/Kconfig: generalize config COMMAND_LINE_SIZE to all architectures"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 19.67 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] init/Kconfig: generalize config COMMAND_LINE_SIZE to all architectures"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.32 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] init/Kconfig: generalize config COMMAND_LINE_SIZE to all architectures"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.86 seconds
Result: WARNING
Output:

WARNING: Non-standard signature: Originally-by:
#24: 
Originally-by: Maciej Żenczykowski <maze@google.com>

total: 0 errors, 1 warnings, 0 checks, 32 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 5ebe9a4072d6 ("init/Kconfig: generalize config COMMAND_LINE_SIZE to all architectures") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 0 checks, 32 lines checked
WARNING: Non-standard signature: Originally-by:


@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] init/Kconfig: generalize config COMMAND_LINE_SIZE to all architectures"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 78.32 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] init/Kconfig: generalize config COMMAND_LINE_SIZE to all architectures"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] init/Kconfig: generalize config COMMAND_LINE_SIZE to all architectures"
kdoc
Desc: Detects for kdoc errors
Duration: 0.70 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] init/Kconfig: generalize config COMMAND_LINE_SIZE to all architectures"
module-param
Desc: Detect module_param changes
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] init/Kconfig: generalize config COMMAND_LINE_SIZE to all architectures"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 5.94 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/3] init/Kconfig: generalize config COMMAND_LINE_SIZE to all architectures"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 3.04 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] arch: use CONFIG_COMMAND_LINE_SIZE across all architectures"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 118.46 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] arch: use CONFIG_COMMAND_LINE_SIZE across all architectures"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1407.61 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] arch: use CONFIG_COMMAND_LINE_SIZE across all architectures"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1713.92 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] arch: use CONFIG_COMMAND_LINE_SIZE across all architectures"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 19.67 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] arch: use CONFIG_COMMAND_LINE_SIZE across all architectures"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.03 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] arch: use CONFIG_COMMAND_LINE_SIZE across all architectures"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 4.15 seconds
Result: WARNING
Output:

WARNING: Non-standard signature: Originally-by:
#19: 
Originally-by: Maciej Żenczykowski <maze@google.com>

total: 0 errors, 1 warnings, 0 checks, 164 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 5fdcdd2b10e8 ("arch: use CONFIG_COMMAND_LINE_SIZE across all architectures") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 0 checks, 164 lines checked
WARNING: Non-standard signature: Originally-by:


@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] arch: use CONFIG_COMMAND_LINE_SIZE across all architectures"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 82.33 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] arch: use CONFIG_COMMAND_LINE_SIZE across all architectures"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 2.19 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] arch: use CONFIG_COMMAND_LINE_SIZE across all architectures"
kdoc
Desc: Detects for kdoc errors
Duration: 1.57 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] arch: use CONFIG_COMMAND_LINE_SIZE across all architectures"
module-param
Desc: Detect module_param changes
Duration: 0.31 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] arch: use CONFIG_COMMAND_LINE_SIZE across all architectures"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.28 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/3] arch: use CONFIG_COMMAND_LINE_SIZE across all architectures"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] init/Kconfig: make config INIT_ENV_ARG_LIMIT user-configurable"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 117.78 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] init/Kconfig: make config INIT_ENV_ARG_LIMIT user-configurable"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1120.34 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] init/Kconfig: make config INIT_ENV_ARG_LIMIT user-configurable"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1398.41 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] init/Kconfig: make config INIT_ENV_ARG_LIMIT user-configurable"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.69 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] init/Kconfig: make config INIT_ENV_ARG_LIMIT user-configurable"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.80 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] init/Kconfig: make config INIT_ENV_ARG_LIMIT user-configurable"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.74 seconds
Result: WARNING
Output:

WARNING: Non-standard signature: Originally-by:
#25: 
Originally-by: Maciej Żenczykowski <maze@google.com>

total: 0 errors, 1 warnings, 0 checks, 11 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 1b8b2bac7187 ("init/Kconfig: make config INIT_ENV_ARG_LIMIT user-configurable") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 0 checks, 11 lines checked
WARNING: Non-standard signature: Originally-by:


@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] init/Kconfig: make config INIT_ENV_ARG_LIMIT user-configurable"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 79.69 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] init/Kconfig: make config INIT_ENV_ARG_LIMIT user-configurable"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 1.29 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] init/Kconfig: make config INIT_ENV_ARG_LIMIT user-configurable"
kdoc
Desc: Detects for kdoc errors
Duration: 0.71 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] init/Kconfig: make config INIT_ENV_ARG_LIMIT user-configurable"
module-param
Desc: Detect module_param changes
Duration: 0.67 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] init/Kconfig: make config INIT_ENV_ARG_LIMIT user-configurable"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 3: "[3/3] init/Kconfig: make config INIT_ENV_ARG_LIMIT user-configurable"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 1.46 seconds
Result: PASS

@linux-riscv-bot
linux-riscv-bot force-pushed the workflow__riscv__fixes branch 2 times, most recently from abf8962 to 9fa746d Compare August 8, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants