Skip to content

Commit 49acebf

Browse files
committed
Remove seccomp
Signed-off-by: Doru Blânzeanu <[email protected]>
1 parent 9f2479b commit 49acebf

File tree

4 files changed

+1
-65
lines changed

4 files changed

+1
-65
lines changed

Cargo.lock

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Justfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,10 @@ clippy target=default-target: (check target)
8787
# There may be tests that we really want to ignore so we cant just use --ignored and run then we have to
8888
# specify the test name of the ignored tests that we want to run
8989
# Additionally, we have to run the tests with the function_call_metrics feature enabled separately
90-
test target=default-target features="": (test-seccomp target features)
90+
test target=default-target features="":
9191
cargo test {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--no-default-features -F " + features } }} --profile={{ if target == "debug" {"dev"} else { target } }}
9292
cargo test test_metrics {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--no-default-features -F " + features } }} --profile={{ if target == "debug" {"dev"} else { target } }} -- --ignored
9393

94-
test-seccomp target=default-target features="":
95-
cargo test {{ if features =="" {'--no-default-features -F "kvm,mshv3,seccomp"'} else {"--no-default-features -F seccomp," + features } }} --profile={{ if target == "debug" {"dev"} else { target } }} -- --test-threads=1
96-
cargo test {{ if features =="" {'--no-default-features -F "kvm,mshv3,seccomp"'} else {"--no-default-features -F seccomp," + features } }} test_metrics --profile={{ if target == "debug" {"dev"} else { target } }} -- --ignored --test-threads=1
97-
cargo test {{ if features =="" {'--no-default-features -F "kvm,mshv3,seccomp"'} else {"--no-default-features -F seccomp," + features } }} test_gather_metrics --profile={{ if target == "debug" {"dev"} else { target } }} -- --ignored --test-threads=1
98-
9994
examples-ci target=default-target features="": (build-rust-wasm-examples target)
10095
cargo run {{ if features =="" {''} else {"--no-default-features -F " + features } }} --profile={{ if target == "debug" {"dev"} else { target } }} --example helloworld
10196
cargo run {{ if features =="" {''} else {"--no-default-features -F " + features } }} --profile={{ if target == "debug" {"dev"} else { target } }} --example hostfuncs

src/hyperlight_wasm/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ tar = "0.4.44"
8585
[features]
8686
default = ["function_call_metrics", "kvm", "mshv3"]
8787
function_call_metrics = ["hyperlight-host/function_call_metrics"]
88-
seccomp = ["hyperlight-host/seccomp"]
8988
print_debug = ["hyperlight-host/print_debug"]
9089
crashdump = ["hyperlight-host/crashdump"]
9190
gdb = ["hyperlight-host/gdb"]

src/hyperlight_wasm/src/sandbox/proto_wasm_sandbox.rs

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ limitations under the License.
1515
*/
1616

1717
use hyperlight_host::func::{HostFunction, ParameterTuple, Registerable, SupportedReturnType};
18-
#[cfg(all(feature = "seccomp", target_os = "linux"))]
19-
use hyperlight_host::sandbox::ExtraAllowedSyscall;
2018
use hyperlight_host::sandbox::config::SandboxConfiguration;
2119
use hyperlight_host::{GuestBinary, Result, UninitializedSandbox, new_error};
2220

@@ -46,18 +44,6 @@ impl Registerable for ProtoWasmSandbox {
4644
.ok_or(new_error!("inner sandbox was none"))
4745
.and_then(|sb| sb.register(name, hf))
4846
}
49-
#[cfg(all(feature = "seccomp", target_os = "linux"))]
50-
fn register_host_function_with_syscalls<Args: ParameterTuple, Output: SupportedReturnType>(
51-
&mut self,
52-
name: &str,
53-
hf: impl Into<HostFunction<Output, Args>>,
54-
eas: Vec<ExtraAllowedSyscall>,
55-
) -> Result<()> {
56-
self.inner
57-
.as_mut()
58-
.ok_or(new_error!("inner sandbox was none"))
59-
.and_then(|sb| sb.register_host_function_with_syscalls(name, hf, eas))
60-
}
6147
}
6248

6349
impl ProtoWasmSandbox {
@@ -119,25 +105,6 @@ impl ProtoWasmSandbox {
119105
.register(name, host_func)
120106
}
121107

122-
/// Register the given host function `host_func` with `self` along with a vec of syscalls the
123-
/// function requires and return `Ok` if the registration succeeded, and a descriptive `Err` if
124-
/// it didn't.
125-
#[cfg(all(feature = "seccomp", target_os = "linux"))]
126-
pub fn register_with_extra_allowed_syscalls<
127-
Args: ParameterTuple,
128-
Output: SupportedReturnType,
129-
>(
130-
&mut self,
131-
name: impl AsRef<str>,
132-
host_func: impl Into<HostFunction<Output, Args>>,
133-
extra_allowed_syscalls: impl IntoIterator<Item = ExtraAllowedSyscall>,
134-
) -> Result<()> {
135-
self.inner
136-
.as_mut()
137-
.ok_or(new_error!("inner sandbox was none"))?
138-
.register_with_extra_allowed_syscalls(name, host_func, extra_allowed_syscalls)
139-
}
140-
141108
/// Register the given host printing function `print_func` with `self`.
142109
/// Return `Ok` if the registration succeeded, and a descriptive `Err` otherwise.
143110
pub fn register_print(
@@ -149,21 +116,6 @@ impl ProtoWasmSandbox {
149116
.ok_or(new_error!("inner sandbox was none"))?
150117
.register_print(print_func)
151118
}
152-
153-
/// Register the given host printing function `print_func` with `self` along with a
154-
/// vec of syscalls the function requires.
155-
/// Return `Ok` if the registration succeeded, and a descriptive `Err` otherwise.
156-
#[cfg(all(feature = "seccomp", target_os = "linux"))]
157-
pub fn register_print_with_extra_allowed_syscalls(
158-
&mut self,
159-
print_func: impl Into<HostFunction<i32, (String,)>>,
160-
extra_allowed_syscalls: impl IntoIterator<Item = ExtraAllowedSyscall>,
161-
) -> Result<()> {
162-
self.inner
163-
.as_mut()
164-
.ok_or(new_error!("inner sandbox was none"))?
165-
.register_print_with_extra_allowed_syscalls(print_func, extra_allowed_syscalls)
166-
}
167119
}
168120

169121
impl std::fmt::Debug for ProtoWasmSandbox {

0 commit comments

Comments
 (0)