Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async usercall interface for SGX enclaves #515

Merged
merged 19 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ jobs:
rustup update

- name: Cargo test --all --exclude sgxs-loaders
run: cargo test --verbose --locked --all --exclude sgxs-loaders && [ "$(echo $(nm -D target/debug/sgx-detect|grep __vdso_sgx_enter_enclave))" = "w __vdso_sgx_enter_enclave" ]
run: cargo test --verbose --locked --all --exclude sgxs-loaders --exclude async-usercalls && [ "$(echo $(nm -D target/debug/sgx-detect|grep __vdso_sgx_enter_enclave))" = "w __vdso_sgx_enter_enclave" ]

- name: cargo test -p async-usercalls --target x86_64-fortanix-unknown-sgx --no-run
run: cargo +nightly test --verbose --locked -p async-usercalls --target x86_64-fortanix-unknown-sgx --no-run

- name: Cargo test -p dcap-ql --features link
run: cargo test --verbose --locked -p dcap-ql --features link
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.cargo
/target
161 changes: 130 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ members = [
"fortanix-vme/tests/iron",
"fortanix-vme/vme-pkix",
"intel-sgx/aesm-client",
"intel-sgx/async-usercalls",
"intel-sgx/dcap-provider",
"intel-sgx/dcap-ql-sys",
"intel-sgx/dcap-ql",
Expand Down
5 changes: 4 additions & 1 deletion doc/generate-api-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ for LIB in $LIBS_SORTED; do
if FEATURES="$(cargo read-manifest|jq -r '.metadata.docs.rs.features | join(",")' 2> /dev/null)"; then
ARGS="--features $FEATURES"
fi
cargo doc --no-deps --lib $ARGS
if grep -q 'feature(sgx_platform)' ./src/lib.rs; then
ARGS+=" --target x86_64-fortanix-unknown-sgx"
fi
cargo +nightly doc --no-deps --lib $ARGS
popd
fi
done
32 changes: 32 additions & 0 deletions intel-sgx/async-usercalls/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[package]
name = "async-usercalls"
version = "0.5.0"
authors = ["Fortanix, Inc."]
license = "MPL-2.0"
edition = "2018"
description = """
An interface for asynchronous usercalls in SGX enclaves.
This is an SGX-only crate, you should compile it with the `x86_64-fortanix-unknown-sgx` target.
"""
repository = "https://github.com/fortanix/rust-sgx"
documentation = "https://edp.fortanix.com/docs/api/async_usercalls/"
homepage = "https://edp.fortanix.com/"
keywords = ["sgx", "async", "usercall"]
categories = ["asynchronous"]

[dependencies]
# Project dependencies
ipc-queue = { version = "0.2", path = "../../ipc-queue" }
fortanix-sgx-abi = { version = "0.5.0", path = "../fortanix-sgx-abi" }

# External dependencies
lazy_static = "1.4.0" # MIT/Apache-2.0
crossbeam-channel = "0.5" # MIT/Apache-2.0
fnv = "1.0" # MIT/Apache-2.0

[dev-dependencies]
rand = "0.8"

# For cargo test --target x86_64-fortanix-unknown-sgx
[package.metadata.fortanix-sgx]
threads = 128
Loading