Skip to content
Permalink
Browse files

Upgrade to SGX SDK v1.1.0 (#184)

* Upgrade to SGX SDK v1.1.0
* Also fix #153
  • Loading branch information
dingelish authored and mssun committed Dec 19, 2019
1 parent a6ddc99 commit 7d27eec03e1741bcb9c0ec3b41486dcf655e301c
Showing with 209 additions and 221 deletions.
  1. +42 −42 .drone.yml
  2. +1 −1 cmake/MesaTEEUtils.cmake
  3. +15 −15 cmake/tomls/Cargo.sgx_trusted_lib.toml
  4. +3 −3 cmake/tomls/Cargo.sgx_untrusted_app.toml
  5. +3 −3 cmake/tomls/Cargo.unix_app.toml
  6. +5 −5 docker/build.ubuntu-1604.Dockerfile
  7. +6 −6 docker/build.ubuntu-1804.Dockerfile
  8. +6 −6 mesatee_core/Cargo.toml
  9. +1 −1 mesatee_core/src/config/mod.rs
  10. +3 −3 mesatee_services/acs/client/Cargo.toml
  11. +3 −3 mesatee_services/acs/proto/Cargo.toml
  12. +2 −2 mesatee_services/acs/sgx_app/Cargo.toml
  13. +3 −3 mesatee_services/acs/sgx_trusted_lib/Cargo.toml
  14. +2 −2 mesatee_services/fns/proto/Cargo.toml
  15. +2 −2 mesatee_services/fns/sgx_app/Cargo.toml
  16. +4 −4 mesatee_services/fns/sgx_trusted_lib/Cargo.toml
  17. +3 −3 mesatee_services/fns/sgx_trusted_lib/src/trusted_worker/logistic_reg.rs
  18. +3 −3 mesatee_services/fns/sgx_trusted_lib/src/trusted_worker/wasm/sgxwasm_compute.rs
  19. +3 −3 mesatee_services/kms/proto/Cargo.toml
  20. +2 −2 mesatee_services/kms/sgx_app/Cargo.toml
  21. +3 −3 mesatee_services/kms/sgx_trusted_lib/Cargo.toml
  22. +2 −2 mesatee_services/tdfs/external/proto/Cargo.toml
  23. +1 −1 mesatee_services/tdfs/external/proto/src/proto.rs
  24. +3 −3 mesatee_services/tdfs/internal/client/Cargo.toml
  25. +3 −3 mesatee_services/tdfs/internal/proto/Cargo.toml
  26. +1 −1 mesatee_services/tdfs/internal/proto/src/proto.rs
  27. +2 −2 mesatee_services/tdfs/sgx_app/Cargo.toml
  28. +3 −3 mesatee_services/tdfs/sgx_trusted_lib/Cargo.toml
  29. +1 −1 mesatee_services/tdfs/sgx_trusted_lib/src/tdfs_external.rs
  30. +1 −1 mesatee_services/tdfs/sgx_trusted_lib/src/tdfs_internal.rs
  31. +2 −2 mesatee_services/tms/common/proto/Cargo.toml
  32. +2 −2 mesatee_services/tms/external/proto/Cargo.toml
  33. +4 −4 mesatee_services/tms/external/proto/src/proto.rs
  34. +3 −3 mesatee_services/tms/internal/client/Cargo.toml
  35. +2 −2 mesatee_services/tms/internal/proto/Cargo.toml
  36. +1 −1 mesatee_services/tms/internal/proto/src/proto.rs
  37. +2 −2 mesatee_services/tms/sgx_app/Cargo.toml
  38. +3 −3 mesatee_services/tms/sgx_trusted_lib/Cargo.toml
  39. +2 −2 teaclave_binder/Cargo.toml
  40. +3 −3 teaclave_common/protected_fs_rs/Cargo.toml
  41. +2 −3 teaclave_common/protected_fs_rs/src/lib.rs
  42. +3 −4 teaclave_common/protected_fs_rs/src/sgx_fs_inner.rs
  43. +1 −1 teaclave_common/protected_fs_rs/src/sgx_tprotected_fs.rs
  44. +4 −4 teaclave_common/rusty_leveldb_sgx/Cargo.toml
  45. +10 −11 teaclave_common/rusty_leveldb_sgx/src/log.rs
  46. +9 −9 teaclave_common/rusty_leveldb_sgx/src/table_block.rs
  47. +7 −16 teaclave_common/rusty_leveldb_sgx/src/table_reader.rs
  48. +4 −4 teaclave_common/rusty_leveldb_sgx/src/version_edit.rs
  49. +1 −1 teaclave_config/Cargo.toml
  50. +2 −2 teaclave_utils/Cargo.toml
  51. +2 −2 tests/functional_test/sgx_app/Cargo.toml
  52. +4 −4 tests/functional_test/sgx_trusted_lib/Cargo.toml
  53. +1 −1 tests/functional_test/sgx_trusted_lib/src/tests/acs_test.rs
  54. +1 −1 third_party/crates-io
  55. +1 −1 third_party/crates-sgx
  56. +1 −1 third_party/rust-sgx-sdk
@@ -3,24 +3,24 @@ name: sgx-debug-ubuntu-1804

steps:
- name: prepare
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- mkdir -p build
- cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DTEST_MODE=ON ..
- name: check
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- cd build && make check
- name: compile
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- export RUSTFLAGS="-D warnings"
- cd build && make VERBOSE=1 -j2
- name: sgx-test
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
environment:
IAS_KEY:
from_secret: V5_KEY
@@ -54,24 +54,24 @@ name: sgx-release-ubuntu-1804

steps:
- name: prepare
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- mkdir -p build
- cd build && cmake -DTEST_MODE=ON ..
- name: check
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- cd build && make check
- name: compile
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- export RUSTFLAGS="-D warnings"
- cd build && make VERBOSE=1 -j2
- name: sgx-test
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
privileged: true
environment:
IAS_KEY:
@@ -105,23 +105,23 @@ name: sim-debug-ubuntu-1804

steps:
- name: prepare
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- mkdir -p build
- cd build && cmake -DTEST_MODE=ON ..
- name: check
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- cd build && make check
- name: compile
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DRUSTFLAGS="-D warnings" -DSGX_SIM_MODE=ON .. && make VERBOSE=1 -j2
- name: sgx-test
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- cd build && make sgx-test
@@ -136,23 +136,23 @@ name: sim-release-ubuntu-1804

steps:
- name: prepare
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- mkdir -p build
- cd build && cmake -DTEST_MODE=YES ..
- name: check
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- cd build && make check
- name: compile
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- cd build && cmake -DRUSTFLAGS="-D warnings" -DSGX_SIM_MODE=ON .. && make VERBOSE=1 -j2
- name: sgx-test
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- cd build && make sgx-test
@@ -167,24 +167,24 @@ name: sgx-debug-ubuntu-1604

steps:
- name: prepare
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
commands:
- . /root/.cargo/env
- mkdir -p build
- cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DTEST_MODE=ON ..
- name: check
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
commands:
- . /root/.cargo/env
- cd build && make check
- name: compile
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
commands:
- . /root/.cargo/env
- export RUSTFLAGS="-D warnings"
- cd build && make VERBOSE=1 -j2
- name: sgx-test
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
environment:
IAS_KEY:
from_secret: V5_KEY
@@ -218,24 +218,24 @@ name: sgx-release-ubuntu-1604

steps:
- name: prepare
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
commands:
- . /root/.cargo/env
- mkdir -p build
- cd build && cmake -DTEST_MODE=ON ..
- name: check
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
commands:
- . /root/.cargo/env
- cd build && make check
- name: compile
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
commands:
- . /root/.cargo/env
- export RUSTFLAGS="-D warnings"
- cd build && make VERBOSE=1 -j2
- name: sgx-test
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
privileged: true
environment:
IAS_KEY:
@@ -269,23 +269,23 @@ name: sim-debug-ubuntu-1604

steps:
- name: prepare
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
commands:
- . /root/.cargo/env
- mkdir -p build
- cd build && cmake -DTEST_MODE=ON ..
- name: check
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
commands:
- . /root/.cargo/env
- cd build && make check
- name: compile
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
commands:
- . /root/.cargo/env
- cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DRUSTFLAGS="-D warnings" -DSGX_SIM_MODE=ON .. && make VERBOSE=1 -j2
- name: sgx-test
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
commands:
- . /root/.cargo/env
- cd build && make sgx-test
@@ -300,23 +300,23 @@ name: sim-release-ubuntu-1604

steps:
- name: prepare
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
commands:
- . /root/.cargo/env
- mkdir -p build
- cd build && cmake ..
- name: check
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
commands:
- . /root/.cargo/env
- cd build && make check
- name: compile
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
commands:
- . /root/.cargo/env
- cd build && cmake -DRUSTFLAGS="-D warnings" -DSGX_SIM_MODE=ON -DTEST_MODE=ON .. && make VERBOSE=1 -j2
- name: sgx-test
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
commands:
- . /root/.cargo/env
- cd build && make sgx-test
@@ -331,18 +331,18 @@ name: lint

steps:
- name: prepare
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- mkdir -p build
- cd build && cmake ..
- name: check
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- cd build && make check
- name: clippy
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- cd build && make CLP=1
@@ -357,24 +357,24 @@ name: coverage

steps:
- name: prepare
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- mkdir -p build
- cd build && cmake -DCMAKE_BUILD_TYPE=DEBUG -DCOV=ON -DTEST_MODE=ON ..
- name: check
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- cd build && make check
- name: compile
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- export RUSTFLAGS="-D warnings"
- cd build && make VERBOSE=1 -j2
- name: sgx-test
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
environment:
IAS_KEY:
from_secret: V5_KEY
@@ -391,7 +391,7 @@ steps:
- cd build && make sgx-test
- name: coverage
failure: ignore
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- cd build && make cov
- bash -c "bash <(curl -s https://codecov.io/bash) -f intermediate/cov.info"
@@ -423,13 +423,13 @@ name: doc

steps:
- name: prepare
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
commands:
- . /root/.cargo/env
- mkdir -p build
- cd build && cmake ..
- name: doc
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.1
image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
failure: ignore
commands:
- . /root/.cargo/env
@@ -20,7 +20,7 @@ endfunction()

function(init_submodules)
execute_process (
COMMAND bash -c "if git submodule status | egrep -q '^[-]|^[+]'; then echo 'INFO: Need to reinitialize git submodules' && git submodule update --init --recursive; fi"
COMMAND bash -c "if [[ ! $(git submodule foreach ls -A) ]] || [[ $(git submodule summary) ]]; then echo INFO: Need to reinitialize git submodules && git submodule update --init --recursive; fi"
)
endfunction()

@@ -32,19 +32,19 @@ exclude = [
mesatee_core = { path = "./mesatee_core" }

# Rust SGX SDK
sgx_alloc = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_build_helper = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_cov = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_libc = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_rand = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_tcrypto = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_tprotected_fs = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_trts = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_tse = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_tstd = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_tunittest = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_types = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_unwind = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_alloc = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }
sgx_build_helper = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }
sgx_cov = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }
sgx_libc = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }
sgx_rand = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }
sgx_tcrypto = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }
sgx_tprotected_fs = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }
sgx_trts = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }
sgx_tse = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }
sgx_tstd = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }
sgx_tunittest = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }
sgx_types = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }
sgx_unwind = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }

# SGX crates
adler32 = { git = "https://github.com/mesalock-linux/adler32-rs-sgx" }
@@ -70,7 +70,7 @@ parity-wasm = { git = "https://github.com/mesalock-linux/parity-wasm-sgx"
png = { git = "https://github.com/mesalock-linux/image-png-sgx" }
profiler_builtins = { git = "https://github.com/mesalock-linux/sgx-fake-profiler-builtins" }
quick-error = { git = "https://github.com/mesalock-linux/quick-error-sgx" }
rand = { git = "https://github.com/mesalock-linux/rand-sgx", tag = "v0.6.5_sgx1.0.9" }
rand = { git = "https://github.com/mesalock-linux/rand-sgx", tag = "v0.6.5_sgx1.1.0" }
regex = { git = "https://github.com/mesalock-linux/regex-sgx" }
ring = { git = "https://github.com/mesalock-linux/ring-sgx", tag = "v0.16.5" }
rustls = { git = "https://github.com/mesalock-linux/rustls", branch = "mesalock_sgx" }
@@ -81,7 +81,7 @@ serde_json = { git = "https://github.com/mesalock-linux/serde-json-sgx" }
tiff = { git = "https://github.com/mesalock-linux/image-tiff-sgx" }
toml = { git = "https://github.com/mesalock-linux/toml-rs-sgx" }
uuid = { git = "https://github.com/mesalock-linux/uuid-sgx" }
wabt = { git = "https://github.com/mesalock-linux/wabt-rs-sgx", branch = "v0.6.0-core" }
wabt = { git = "https://github.com/mesalock-linux/wabt-rs-sgx", branch = "v0.9-core" }
wasmi = { git = "https://github.com/mesalock-linux/wasmi-sgx" }
webpki = { git = "https://github.com/mesalock-linux/webpki", branch = "mesalock_sgx" }
webpki-roots = { git = "https://github.com/mesalock-linux/webpki-roots", branch = "mesalock_sgx" }
@@ -20,6 +20,6 @@ mesatee_core = { path = "./mesatee_core" }
teaclave_binder = { path = "./teaclave_binder" }

# We cannot remove these crates, because proto crates depend on them
sgx_cov = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_urts = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_types = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_cov = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }
sgx_urts = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }
sgx_types = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }
@@ -40,6 +40,6 @@ mesatee_core = { path = "./mesatee_core" }
mesatee_sdk = { path = "./mesatee_sdk" }

# We cannot remove these crates, because proto crates depend on them
sgx_cov = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_urts = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_types = { git = "https://github.com/baidu/rust-sgx-sdk", rev = "v1.0.9" }
sgx_cov = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }
sgx_urts = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }
sgx_types = { git = "https://github.com/apache/teaclave-sgx-sdk", rev = "v1.1.0" }

0 comments on commit 7d27eec

Please sign in to comment.
You can’t perform that action at this time.