diff --git a/Cargo.lock b/Cargo.lock index e86ee1ae5d..a88fef2ea4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1540,7 +1540,6 @@ dependencies = [ "phf", "rand 0.9.2", "slab", - "syscalls", "tar", "tempfile", "thread_local", diff --git a/crates/fspy/Cargo.toml b/crates/fspy/Cargo.toml index 66f4b3852c..703d509ae2 100644 --- a/crates/fspy/Cargo.toml +++ b/crates/fspy/Cargo.toml @@ -26,7 +26,6 @@ arrayvec = { workspace = true } blink-alloc = { workspace = true } fspy_seccomp_unotify = { workspace = true, features = ["supervisor"] } nix = { workspace = true, features = ["uio"] } -syscalls = { workspace = true, features = ["std"] } thread_local = { workspace = true } tokio = { workspace = true, features = ["bytes"] } tokio-seqpacket = { workspace = true } diff --git a/crates/fspy_seccomp_unotify/src/supervisor/handler/mod.rs b/crates/fspy_seccomp_unotify/src/supervisor/handler/mod.rs index d741a70c6d..ca19d06696 100644 --- a/crates/fspy_seccomp_unotify/src/supervisor/handler/mod.rs +++ b/crates/fspy_seccomp_unotify/src/supervisor/handler/mod.rs @@ -9,6 +9,9 @@ pub trait SeccompNotifyHandler { fn handle_notify(&mut self, notify: &seccomp_notif) -> io::Result<()>; } +#[doc(hidden)] // Re-export for use in the macro +pub use syscalls::Sysno; + #[macro_export] macro_rules! impl_handler { ($type:ty: $( @@ -17,17 +20,17 @@ macro_rules! impl_handler { )* ) => { impl $crate::supervisor::handler::SeccompNotifyHandler for $type { - fn syscalls() -> &'static [::syscalls::Sysno] { + fn syscalls() -> &'static [$crate::supervisor::handler::Sysno] { &[ $( $(#[$attr])? - ::syscalls::Sysno::$syscall + $crate::supervisor::handler::Sysno::$syscall ),* ] } fn handle_notify(&mut self, notify: &::libc::seccomp_notif) -> ::std::io::Result<()> { $crate::supervisor::handler::arg::Caller::with_pid(notify.pid as _, |caller| { $( $(#[$attr])? - if notify.data.nr == ::syscalls::Sysno::$syscall as _ { + if notify.data.nr == $crate::supervisor::handler::Sysno::$syscall as _ { return self.$syscall(caller, $crate::supervisor::handler::arg::FromNotify::from_notify(notify)?) } )*