For Linux guests (including the default urunit path) we hand the application its arguments through the kernel command line — init=/urunit -- <args>, joined with spaces. When kernel splits on white spaces and treats -- specially. Anything that does't fit those rules exact gets changed silently, when the guest boots fine,
A few shapes I ran into,
- An empty argument disappears, since everything is glued together with spaces —
["a", "", "b"] reaches the app as a, b.
- An argument that's literally
-- cuts off everything after it — ["a", "--", "b", "c"] arrives as just a.
- A long argument list gets chopped at 2048 bytes, the last argument is cut mid value and anything past it is gone.
- Go past 32 arguments and the guest doesn't start at all, it panics,
Kernel panic - not syncing: Too many boot init vars.
I don't think these are four separate parsing bugs so much as one thing: the command line was never really able to carry an arbitrary argument list.
For Linux guests (including the default urunit path) we hand the application its arguments through the kernel command line —
init=/urunit -- <args>, joined with spaces. When kernel splits on white spaces and treats--specially. Anything that does't fit those rules exact gets changed silently, when the guest boots fine,A few shapes I ran into,
["a", "", "b"]reaches the app asa,b.--cuts off everything after it —["a", "--", "b", "c"]arrives as justa.Kernel panic - not syncing: Too many boot init vars.I don't think these are four separate parsing bugs so much as one thing: the command line was never really able to carry an arbitrary argument list.