casaroli opened a new pull request, #20596:
URL: https://github.com/apache/nuttx/pull/20596

   ## Summary
   
   `ARG_MAX` was fixed at the POSIX minimum of 4096 bytes, and the argument 
count of a new task was fixed at 256 in two places (`binfmt_copyargv()` and 
`nxtask_setup_stackargs()`). Programs that build command lines, such as xargs, 
size them from `ARG_MAX`, and some programs run commands with more than 256 
arguments.
   
   This PR adds `CONFIG_TASK_ARG_MAX`, which sets `ARG_MAX`, and 
`CONFIG_TASK_MAX_ARGS`, which sets the argument count limit in both places. The 
defaults are the old values, so nothing changes unless a configuration sets 
them. The first commit fixes the old nxstyle errors in `task_setup.c`, with no 
code change.
   
   ## Impact
   
   Two new options in `sched/Kconfig`. With the defaults, no change.
   
   ## Testing
   
   The run-time tests ran on a local branch that has this change and other 
pending changes on top of master; the builds are of this branch alone.
   
   qemu-armv8a, kernel build, QEMU 11 with HVF, a local configuration with 
`CONFIG_TASK_ARG_MAX=32768` and `CONFIG_TASK_MAX_ARGS=1024`: an exec with 1000 
arguments and 7000 bytes of arguments works (`echo $(seq 100000 100999) | wc` 
prints 1000 words, 7000 bytes).
   
   Builds with `-Wno-cpp -Werror`: `qemu-armv8a:nsh`, `qemu-armv8a:knsh`, 
`rv-virt:knsh64`, `lm3s6965-ek:qemu-flat`. `tools/checkpatch.sh -c -u -m -g` 
passes.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to