diff --git a/Cargo.lock b/Cargo.lock index e65620b5a..5ee2f1672 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -529,9 +529,9 @@ dependencies = [ [[package]] name = "linux-loader" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62a2f912deca034ec34b0a43a390059ea98daac40e440ebe8bea88f3315fe168" +checksum = "f8242360c7d79a7713a28043c994b815e9820b0e97e44b228ec9bd913c16bdfe" dependencies = [ "vm-memory", ] diff --git a/arch/Cargo.toml b/arch/Cargo.toml index 10bdfe182..6bfb9ff27 100644 --- a/arch/Cargo.toml +++ b/arch/Cargo.toml @@ -13,7 +13,7 @@ anyhow = "1.0.66" byteorder = "1.4.3" hypervisor = { path = "../hypervisor" } libc = "0.2.137" -linux-loader = { version = "0.6.0", features = ["elf", "bzimage", "pe"] } +linux-loader = { version = "0.7.0", features = ["elf", "bzimage", "pe"] } log = "0.4.17" serde = { version = "1.0.147", features = ["rc", "derive"] } thiserror = "1.0.37" diff --git a/vmm/Cargo.toml b/vmm/Cargo.toml index 7c2e771f8..9b147a188 100644 --- a/vmm/Cargo.toml +++ b/vmm/Cargo.toml @@ -27,7 +27,7 @@ gdbstub = { version = "0.6.3", optional = true } gdbstub_arch = { version = "0.2.4", optional = true } hypervisor = { path = "../hypervisor" } libc = "0.2.137" -linux-loader = { version = "0.6.0", features = ["elf", "bzimage", "pe"] } +linux-loader = { version = "0.7.0", features = ["elf", "bzimage", "pe"] } log = "0.4.17" micro_http = { git = "https://github.com/firecracker-microvm/micro-http", branch = "main" } net_util = { path = "../net_util" } diff --git a/vmm/src/vm.rs b/vmm/src/vm.rs index 951ee365f..3813ac371 100644 --- a/vmm/src/vm.rs +++ b/vmm/src/vm.rs @@ -127,6 +127,9 @@ pub enum Error { #[error("Cannot modify the kernel command line: {0}")] CmdLineInsertStr(#[source] linux_loader::cmdline::Error), + #[error("Cannot create the kernel command line: {0}")] + CmdLineCreate(#[source] linux_loader::cmdline::Error), + #[error("Cannot configure system: {0}")] ConfigureSystem(#[source] arch::Error), @@ -897,7 +900,7 @@ impl Vm { payload: &PayloadConfig, #[cfg(target_arch = "aarch64")] device_manager: &Arc>, ) -> Result { - let mut cmdline = Cmdline::new(arch::CMDLINE_MAX_SIZE); + let mut cmdline = Cmdline::new(arch::CMDLINE_MAX_SIZE).map_err(Error::CmdLineCreate)?; if let Some(s) = payload.cmdline.as_ref() { cmdline.insert_str(s).map_err(Error::CmdLineInsertStr)?; }