Skip to content

Commit

Permalink
stratovirt: add micro_vm-allow-SYS_clock_gettime.patch
Browse files Browse the repository at this point in the history
(cherry picked from commit 9603253)
  • Loading branch information
astro authored and alyssais committed Jun 27, 2023
1 parent d6670e6 commit 649f438
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkgs/applications/virtualization/stratovirt/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ rustPlatform.buildRustPackage rec {
rev = "v${version}";
sha256 = "sha256-K99CmaBrJu30/12FxnsNsDKsTyX4f2uQSO7cwHsPuDw=";
};
patches = [ ./micro_vm-allow-SYS_clock_gettime.patch ];

cargoSha256 = "sha256-SFIOGGRzGkVWHIXkviVWuhDN29pa0uD3GqKh+G421xI=";

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From af3001b1b2697ae3165e2fdf47a560fd9ab19a68 Mon Sep 17 00:00:00 2001
From: Astro <astro@spaceboyz.net>
Date: Sun, 18 Jun 2023 23:10:23 +0200
Subject: [PATCH] micro_vm: allow SYS_clock_gettime

---
machine/src/micro_vm/syscall.rs | 2 ++
1 file changed, 2 insertions(+)

diff --git a/machine/src/micro_vm/syscall.rs b/machine/src/micro_vm/syscall.rs
index 89ce5c29..2a6aa0cc 100644
--- a/machine/src/micro_vm/syscall.rs
+++ b/machine/src/micro_vm/syscall.rs
@@ -128,6 +128,8 @@ pub fn syscall_whitelist() -> Vec<BpfRule> {
#[cfg(all(target_env = "gnu", target_arch = "x86_64"))]
BpfRule::new(libc::SYS_readlink),
BpfRule::new(libc::SYS_getrandom),
+ #[cfg(target_env = "gnu")]
+ BpfRule::new(libc::SYS_clock_gettime),
madvise_rule(),
]
}
--
2.41.0

0 comments on commit 649f438

Please sign in to comment.