Skip to content

Commit f917b37

Browse files
author
Vasili Novikov
committed
Async usercall interface for SGX enclaves
Credits for this commit go to: Mohsen: #404 YxC: #441 This commit is an attempt to have the async-usercalls finally merged into the main codebase (master branch).
1 parent 66e7a21 commit f917b37

26 files changed

+2276
-89
lines changed

Diff for: .travis.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ matrix:
2626
- clang-11
2727
- musl-tools
2828
rust:
29-
- stable
29+
- nightly-2023-05-07
3030
env:
3131
- RUST_BACKTRACE=1
3232
- CFLAGS_x86_64_fortanix_unknown_sgx="-isystem/usr/include/x86_64-linux-gnu -mlvi-hardening -mllvm -x86-experimental-lvi-inline-asm-hardening"
@@ -44,7 +44,8 @@ matrix:
4444
- rustup toolchain add nightly
4545
- rustup target add x86_64-fortanix-unknown-sgx --toolchain nightly
4646
script:
47-
- 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" ]
47+
- 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" ]
48+
- cargo test --verbose --locked -p async-usercalls --target x86_64-fortanix-unknown-sgx --no-run
4849
- cargo test --verbose --locked -p dcap-ql --features link
4950
- cargo test --verbose --locked -p dcap-ql --features verify
5051
- cargo test --verbose --locked -p ias --features mbedtls

Diff for: Cargo.lock

+87-30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ members = [
1212
"fortanix-vme/tests/iron",
1313
"fortanix-vme/vme-pkix",
1414
"intel-sgx/aesm-client",
15+
"intel-sgx/async-usercalls",
1516
"intel-sgx/dcap-provider",
1617
"intel-sgx/dcap-ql-sys",
1718
"intel-sgx/dcap-ql",

Diff for: doc/generate-api-docs.sh

+3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ for LIB in $LIBS_SORTED; do
5858
if FEATURES="$(cargo read-manifest|jq -r '.metadata.docs.rs.features | join(",")' 2> /dev/null)"; then
5959
ARGS="--features $FEATURES"
6060
fi
61+
if grep -q 'feature(sgx_platform)' ./src/lib.rs; then
62+
ARGS+=" --target x86_64-fortanix-unknown-sgx"
63+
fi
6164
cargo doc --no-deps --lib $ARGS
6265
popd
6366
fi

Diff for: intel-sgx/async-usercalls/Cargo.toml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[package]
2+
name = "async-usercalls"
3+
version = "0.5.0"
4+
authors = ["Fortanix, Inc."]
5+
license = "MPL-2.0"
6+
edition = "2018"
7+
description = """
8+
An interface for asynchronous usercalls in SGX enclaves.
9+
This is an SGX-only crate, you should compile it with the `x86_64-fortanix-unknown-sgx` target.
10+
"""
11+
repository = "https://github.com/fortanix/rust-sgx"
12+
documentation = "https://edp.fortanix.com/docs/api/async_usercalls/"
13+
homepage = "https://edp.fortanix.com/"
14+
keywords = ["sgx", "async", "usercall"]
15+
categories = ["asynchronous"]
16+
17+
[dependencies]
18+
# Project dependencies
19+
ipc-queue = { version = "0.2", path = "../../ipc-queue" }
20+
fortanix-sgx-abi = { version = "0.5.0", path = "../fortanix-sgx-abi" }
21+
22+
# External dependencies
23+
lazy_static = "1.4.0" # MIT/Apache-2.0
24+
crossbeam-channel = "0.5" # MIT/Apache-2.0
25+
fnv = "1.0" # MIT/Apache-2.0
26+
27+
# For cargo test --target x86_64-fortanix-unknown-sgx
28+
[package.metadata.fortanix-sgx]
29+
threads = 128

0 commit comments

Comments
 (0)