Skip to content

Commit

Permalink
Merge pull request #515 from vn971/vas/async-usercalls-scratch
Browse files Browse the repository at this point in the history
Async usercall interface for SGX enclaves
  • Loading branch information
raoulstrackx authored Jan 18, 2024
2 parents 8b187bd + a8d0d46 commit fe323cb
Show file tree
Hide file tree
Showing 26 changed files with 2,409 additions and 93 deletions.
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

0 comments on commit fe323cb

Please sign in to comment.