Skip to content

Commit 8474838

Browse files
SuperSandro2000astro
authored andcommitted
Don't force a copy of init from kernelParams on the host
1 parent 679e76c commit 8474838

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

lib/runners/alioth.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ in {
2121
"--num-cpu" (toString vcpu)
2222
"-k" (lib.escapeShellArg "${kernel}/${pkgs.stdenv.hostPlatform.linux-kernel.target}")
2323
"-i" initrdPath
24-
"-c" (lib.escapeShellArg "console=ttyS0 reboot=k panic=1 ${toString microvmConfig.kernelParams}")
24+
"-c" (lib.escapeShellArg "console=ttyS0 reboot=k panic=1 ${builtins.unsafeDiscardStringContext (toString microvmConfig.kernelParams)}")
2525
"--entropy"
2626
]
2727
++

lib/runners/cloud-hypervisor.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ in {
144144
"--serial" "tty"
145145
"--kernel" kernelPath
146146
"--initramfs" initrdPath
147-
"--cmdline" "${kernelConsole} reboot=t panic=-1 ${toString microvmConfig.kernelParams}"
147+
"--cmdline" "${kernelConsole} reboot=t panic=-1 ${builtins.unsafeDiscardStringContext (toString microvmConfig.kernelParams)}"
148148
"--seccomp" "true"
149149
"--memory" memOps
150150
]

lib/runners/crosvm.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ in {
5252
"-m" (toString (mem + balloonMem))
5353
"-c" (toString vcpu)
5454
"--serial" "type=stdout,console=true,stdin=true"
55-
"-p" "console=ttyS0 reboot=k panic=1 ${toString microvmConfig.kernelParams}"
55+
"-p" "console=ttyS0 reboot=k panic=1 ${builtins.unsafeDiscardStringContext (toString microvmConfig.kernelParams)}"
5656
]
5757
++
5858
lib.optionals storeOnDisk [

lib/runners/firecracker.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ let
2222
boot-source = {
2323
kernel_image_path = kernelPath;
2424
initrd_path = initrdPath;
25-
boot_args = "console=ttyS0 noapic acpi=off reboot=k panic=1 verbose i8042.noaux i8042.nomux i8042.nopnp i8042.dumbkbd ${toString microvmConfig.kernelParams}";
25+
boot_args = "console=ttyS0 noapic acpi=off reboot=k panic=1 verbose i8042.noaux i8042.nomux i8042.nopnp i8042.dumbkbd ${builtins.unsafeDiscardStringContext (toString microvmConfig.kernelParams)}";
2626
};
2727
machine-config = {
2828
vcpu_count = vcpu;

lib/runners/kvmtool.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ in {
2929
"--rng"
3030
"-k" (lib.escapeShellArg "${kernel}/${pkgs.stdenv.hostPlatform.linux-kernel.target}")
3131
"-i" initrdPath
32-
"-p" (lib.escapeShellArg "console=ttyS0 reboot=k panic=1 ${toString microvmConfig.kernelParams}")
32+
"-p" (lib.escapeShellArg "console=ttyS0 reboot=k panic=1 ${builtins.unsafeDiscardStringContext (toString microvmConfig.kernelParams)}")
3333
]
3434
++
3535
lib.optionals storeOnDisk [

lib/runners/qemu.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ lib.warnIf (mem == 2048) ''
183183
lib.optionals (system == "x86_64-linux") [
184184
"-device" "i8042"
185185

186-
"-append" "${kernelConsole} reboot=t panic=-1 ${toString microvmConfig.kernelParams}"
186+
"-append" "${kernelConsole} reboot=t panic=-1 ${builtins.unsafeDiscardStringContext (toString microvmConfig.kernelParams)}"
187187
] ++
188188
lib.optionals (system == "aarch64-linux") [
189-
"-append" "${kernelConsole} reboot=t panic=-1 ${toString microvmConfig.kernelParams}"
189+
"-append" "${kernelConsole} reboot=t panic=-1 ${builtins.unsafeDiscardStringContext (toString microvmConfig.kernelParams)}"
190190
] ++
191191
lib.optionals storeOnDisk [
192192
"-drive" "id=store,format=raw,read-only=on,file=${storeDisk},if=none,aio=io_uring"

lib/runners/stratovirt.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ in {
8181

8282
"-kernel" "${kernel}/bzImage"
8383
"-initrd" initrdPath
84-
"-append" "console=${console} edd=off reboot=t panic=-1 verbose ${toString microvmConfig.kernelParams}"
84+
"-append" "console=${console} edd=off reboot=t panic=-1 verbose ${builtins.unsafeDiscardStringContext (toString microvmConfig.kernelParams)}"
8585

8686
"-serial" "stdio"
8787
"-object" "rng-random,id=rng,filename=/dev/random"

0 commit comments

Comments
 (0)