Skip to content

fix(linux): pass the application command to urunit in config - #1136

Open
indrajithek wants to merge 3 commits into
urunc-dev:mainfrom
indrajithek:fix/linux-args-urunit-config
Open

indrajithek wants to merge 3 commits into
urunc-dev:mainfrom
indrajithek:fix/linux-args-urunit-config

Conversation

@indrajithek

Copy link
Copy Markdown

Description

Linux guests that use urunit as init, urunc passes the application's arguments on the kernel command line. The kernel can't carry an arbitrary argument list, so some arguments get dropped or cut (described in #1067).

This writes the application command into the urunit config as ARC/ARV entries, the same way FreeBSD guests already do. urunit takes the command from the config when it is started without arguments. Plus aargument with newline is handled with clear error message (since the config is line based)

Note: Given ARC/ARV support came out recent, image with an older urunit fails to start with No application execute. I checked the /urunit binary in the Linux e2e images: the 8 *-linux-raw ones don't have it (I've not check the initrd and block ones), so they would need a rebuild from urunit:latest. The v0.1.0 download links in the tutorial have the same problem.

Related issues

How was this tested?

All the cases reported in #1067 are tested via unit tests linux_test.go

LLM usage

Only claude Code Opus 5.5 with XHigh effort is used (manual mode). Decision making or architecture is not by AI. If code generation was used, its reviwed manually line by line (e.g., the argument with newline error handing, claude genarated 3 lines, and I reviewed it).

Checklist

  • I have read the contribution guide.
  • The linter passes locally (make lint).
  • The e2e tests of at least one tool pass locally (make test_ctr, make test_nerdctl, make test_docker, make test_crictl). Before running this all linux images need to rebuild with latest urunit with ARC/ARV
  • If LLMs were used: I have read the llm policy.

@netlify

netlify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for urunc ready!

Name Link
🔨 Latest commit 96b1459
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6adc5dee4e402e2219fd419a
😎 Deploy Preview https://deploy-preview-1136--urunc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

The Linux kernel command line cannot carry an arbitrary argument list:
an empty argument disappears, a literal `--` cuts off the rest, the
list is truncated at 2048 bytes and more than 32 arguments panic the
kernel.

When urunit is the init, write the application command in the urunit
configuration as `ARC`/`ARV` entries, as FreeBSD guests already do, and
stop passing it on the kernel command line. Also return a clear error
when an argument contains a newline.

This fix requires a urunit that reads `ARC`/`ARV`.

Fixes: urunc-dev#1067
Signed-off-by: Indrajith <29561593+indrajithek@users.noreply.github.com>
@indrajithek
indrajithek force-pushed the fix/linux-args-urunit-config branch from 685b42f to fba940e Compare October 24, 2026 07:25
Signed-off-by: Indrajith <29561593+indrajithek@users.noreply.github.com>
Add the `ARC`/`ARV` entries to the documented urunit configuration
format and update the list of actions urunit performs.

Ref: urunc-dev#1067
Signed-off-by: Indrajith <29561593+indrajithek@users.noreply.github.com>
@indrajithek
indrajithek force-pushed the fix/linux-args-urunit-config branch from fba940e to 96b1459 Compare October 24, 2026 07:27

This branch has not been deployed

No deployments
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.

Passing app arguments on the kernel command line quietly mangles some of them

1 participant