From a83049f011f18b519521244280bc26c937291005 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 19:03:37 +0000 Subject: [PATCH 1/2] Bump kvm-bindings from 0.13.0 to 0.14.0 Bumps [kvm-bindings](https://github.com/rust-vmm/kvm) from 0.13.0 to 0.14.0. - [Release notes](https://github.com/rust-vmm/kvm/releases) - [Commits](https://github.com/rust-vmm/kvm/compare/kvm-bindings-v0.13.0...kvm-bindings-v0.14.0) --- updated-dependencies: - dependency-name: kvm-bindings dependency-version: 0.14.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 13 +++++++++++-- src/hyperlight_host/Cargo.toml | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 751c2a3bc..bee89d08c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1454,7 +1454,7 @@ dependencies = [ "hyperlight-component-macro", "hyperlight-guest-tracing", "hyperlight-testing", - "kvm-bindings", + "kvm-bindings 0.14.0", "kvm-ioctls", "lazy_static", "libc", @@ -1791,6 +1791,15 @@ dependencies = [ "vmm-sys-util 0.14.0", ] +[[package]] +name = "kvm-bindings" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b3c06ff73c7ce03e780887ec2389d62d2a2a9ddf471ab05c2ff69207cd3f3b4" +dependencies = [ + "vmm-sys-util 0.15.0", +] + [[package]] name = "kvm-ioctls" version = "0.23.0" @@ -1798,7 +1807,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e00243d27a20feb05cf001ae52ddc79831ac70c020f215ba1153ff9270b650a" dependencies = [ "bitflags 2.9.3", - "kvm-bindings", + "kvm-bindings 0.13.0", "libc", "vmm-sys-util 0.14.0", ] diff --git a/src/hyperlight_host/Cargo.toml b/src/hyperlight_host/Cargo.toml index 94c26e369..c07083dc2 100644 --- a/src/hyperlight_host/Cargo.toml +++ b/src/hyperlight_host/Cargo.toml @@ -74,7 +74,7 @@ lazy_static = "1.4.0" [target.'cfg(unix)'.dependencies] seccompiler = { version = "0.5.0", optional = true } -kvm-bindings = { version = "0.13", features = ["fam-wrappers"], optional = true } +kvm-bindings = { version = "0.14", features = ["fam-wrappers"], optional = true } kvm-ioctls = { version = "0.23", optional = true } mshv-bindings2 = { package="mshv-bindings", version = "=0.2.1", optional = true } mshv-ioctls2 = { package="mshv-ioctls", version = "=0.2.1", optional = true} From 9ad4433cdcc4597738cb12e01aaf6db8340464da Mon Sep 17 00:00:00 2001 From: James Sturtevant Date: Mon, 25 Aug 2025 19:15:00 +0000 Subject: [PATCH 2/2] Upgrade KVM bindings and map error type directly Signed-off-by: James Sturtevant --- Cargo.lock | 41 +++++-------------- src/hyperlight_host/Cargo.toml | 2 +- src/hyperlight_host/src/error.rs | 2 +- .../src/signal_handlers/mod.rs | 6 ++- 4 files changed, 17 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bee89d08c..409635181 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1454,7 +1454,7 @@ dependencies = [ "hyperlight-component-macro", "hyperlight-guest-tracing", "hyperlight-testing", - "kvm-bindings 0.14.0", + "kvm-bindings", "kvm-ioctls", "lazy_static", "libc", @@ -1495,7 +1495,7 @@ dependencies = [ "tracing-subscriber", "tracing-tracy", "uuid", - "vmm-sys-util 0.15.0", + "vmm-sys-util", "windows", "windows-result", "windows-sys 0.60.2", @@ -1782,34 +1782,25 @@ dependencies = [ "smallvec", ] -[[package]] -name = "kvm-bindings" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3432d9f609fbede9f624d1dbefcce77985a9322de1d0e6d460ec05502b7fd0" -dependencies = [ - "vmm-sys-util 0.14.0", -] - [[package]] name = "kvm-bindings" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b3c06ff73c7ce03e780887ec2389d62d2a2a9ddf471ab05c2ff69207cd3f3b4" dependencies = [ - "vmm-sys-util 0.15.0", + "vmm-sys-util", ] [[package]] name = "kvm-ioctls" -version = "0.23.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e00243d27a20feb05cf001ae52ddc79831ac70c020f215ba1153ff9270b650a" +checksum = "333f77a20344a448f3f70664918135fddeb804e938f28a99d685bd92926e0b19" dependencies = [ "bitflags 2.9.3", - "kvm-bindings 0.13.0", + "kvm-bindings", "libc", - "vmm-sys-util 0.14.0", + "vmm-sys-util", ] [[package]] @@ -2065,7 +2056,7 @@ checksum = "f416b4432174e5a3f956a7887f4c1a4acea9511d81def67fcb8473293630ab9e" dependencies = [ "libc", "num_enum", - "vmm-sys-util 0.15.0", + "vmm-sys-util", "zerocopy 0.7.35", ] @@ -2077,7 +2068,7 @@ checksum = "1e0cb5031f3243a7459b7c13d960d25420980874eebda816db24ce6077e21d43" dependencies = [ "libc", "num_enum", - "vmm-sys-util 0.15.0", + "vmm-sys-util", "zerocopy 0.8.26", ] @@ -2090,7 +2081,7 @@ dependencies = [ "libc", "mshv-bindings 0.2.1", "thiserror 1.0.69", - "vmm-sys-util 0.15.0", + "vmm-sys-util", ] [[package]] @@ -2102,7 +2093,7 @@ dependencies = [ "libc", "mshv-bindings 0.3.2", "thiserror 2.0.16", - "vmm-sys-util 0.15.0", + "vmm-sys-util", ] [[package]] @@ -3919,16 +3910,6 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" -[[package]] -name = "vmm-sys-util" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d21f366bf22bfba3e868349978766a965cbe628c323d58e026be80b8357ab789" -dependencies = [ - "bitflags 1.3.2", - "libc", -] - [[package]] name = "vmm-sys-util" version = "0.15.0" diff --git a/src/hyperlight_host/Cargo.toml b/src/hyperlight_host/Cargo.toml index c07083dc2..b3b608d21 100644 --- a/src/hyperlight_host/Cargo.toml +++ b/src/hyperlight_host/Cargo.toml @@ -75,7 +75,7 @@ lazy_static = "1.4.0" [target.'cfg(unix)'.dependencies] seccompiler = { version = "0.5.0", optional = true } kvm-bindings = { version = "0.14", features = ["fam-wrappers"], optional = true } -kvm-ioctls = { version = "0.23", optional = true } +kvm-ioctls = { version = "0.24", optional = true } mshv-bindings2 = { package="mshv-bindings", version = "=0.2.1", optional = true } mshv-ioctls2 = { package="mshv-ioctls", version = "=0.2.1", optional = true} mshv-bindings3 = { package="mshv-bindings", version = "=0.3.2", optional = true } diff --git a/src/hyperlight_host/src/error.rs b/src/hyperlight_host/src/error.rs index c07f9857f..d2fb382a0 100644 --- a/src/hyperlight_host/src/error.rs +++ b/src/hyperlight_host/src/error.rs @@ -268,7 +268,7 @@ pub enum HyperlightError { /// vmm sys Error Occurred #[error("vmm sys Error {0:?}")] #[cfg(target_os = "linux")] - VmmSysError(#[from] vmm_sys_util::errno::Error), + VmmSysError(vmm_sys_util::errno::Error), /// Windows Error #[cfg(target_os = "windows")] diff --git a/src/hyperlight_host/src/signal_handlers/mod.rs b/src/hyperlight_host/src/signal_handlers/mod.rs index bf35d499d..db52035d5 100644 --- a/src/hyperlight_host/src/signal_handlers/mod.rs +++ b/src/hyperlight_host/src/signal_handlers/mod.rs @@ -32,7 +32,8 @@ pub(crate) fn setup_signal_handlers(config: &SandboxConfiguration) -> crate::Res vmm_sys_util::signal::register_signal_handler( libc::SIGSYS, sigsys_signal_handler::handle_sigsys, - )?; + ) + .map_err(crate::HyperlightError::VmmSysError)?; let original_hook = std::panic::take_hook(); // Set a custom panic hook that checks for "DisallowedSyscall" @@ -52,7 +53,8 @@ pub(crate) fn setup_signal_handlers(config: &SandboxConfiguration) -> crate::Res vmm_sys_util::signal::register_signal_handler( libc::SIGRTMIN() + config.get_interrupt_vcpu_sigrtmin_offset() as c_int, vm_kill_signal, - )?; + ) + .map_err(crate::HyperlightError::VmmSysError)?; // Note: For libraries registering signal handlers, it's important to keep in mind that // the user of the library could have their own signal handlers that we don't want to