Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
virtme-run: Don't panic if an unrecognized argument is passed to -a
The kernel interprets: init=/bin/sh foobar -- baz quux as a request to run /bin/sh foobar baz quux, unless foobar is a known kernel parameter. As a result, passing '-a foobar' to virtme-run will panic the guest. I think this is a bug or design error in the kernel argument parser. Fortunately, there's another counterbalancing quirk: foobar init=/bin/sh -- baz quux will cause foobar to be ignored because init=/bin/sh resets accumulated init arguments. Reorder our argument generation to take advantage of this quirk and avoid panicking if a bad argument is passed. Signed-off-by: Andy Lutomirski <luto@kernel.org>
- Loading branch information