diff --git a/.githooks/post-commit b/.githooks/post-commit index 2a8b183d..a17b4796 100755 --- a/.githooks/post-commit +++ b/.githooks/post-commit @@ -1,6 +1,6 @@ #!/bin/bash cd src/libos -output=$(cargo fmt --all -- --check 2>&1) +output=$(cargo fmt -- --check 2>&1) retval=$? if [[ $retval -eq 0 ]] @@ -8,7 +8,7 @@ then exit 0 elif [[ $retval -eq 1 ]] then - echo "Rust format suggestsions (generated by \`cd src/libos && cargo fmt --all -- --check\`):" + echo "Rust format suggestsions (generated by \`cd src/libos && cargo fmt -- --check\`):" echo echo "$output" echo diff --git a/.githooks/pre-push b/.githooks/pre-push index ba12969d..c65d3cde 100755 --- a/.githooks/pre-push +++ b/.githooks/pre-push @@ -20,13 +20,13 @@ # with "WIP" (work in progress). cd src/libos -output=$(cargo fmt --all -- --check 2>&1) +output=$(cargo fmt -- --check 2>&1) retval=$? # cargo fmt finds any format issues if [[ $retval -eq 1 ]] then - echo "Rust format suggestsions (generated by \`cd src/libos && cargo fmt --all -- --check\`):" + echo "Rust format suggestsions (generated by \`cd src/libos && cargo fmt -- --check\`):" echo echo "$output" echo diff --git a/.gitmodules b/.gitmodules index 43ee963e..617ef9d7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "deps/rust-sgx-sdk"] path = deps/rust-sgx-sdk - url = https://github.com/baidu/rust-sgx-sdk + url = https://github.com/apache/incubator-teaclave-sgx-sdk branch = master [submodule "deps/xmas-elf"] path = deps/xmas-elf @@ -9,3 +9,12 @@ [submodule "deps/sefs"] path = deps/sefs url = https://github.com/occlum/sefs.git +[submodule "deps/serde-sgx"] + path = deps/serde-sgx + url = https://github.com/mesalock-linux/serde-sgx +[submodule "deps/itoa-sgx"] + path = deps/itoa-sgx + url = https://github.com/mesalock-linux/itoa-sgx +[submodule "deps/serde-json-sgx"] + path = deps/serde-json-sgx + url = https://github.com/mesalock-linux/serde-json-sgx diff --git a/Makefile b/Makefile index b81ff8fb..ad9a5d06 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,9 @@ githooks: submodule: githooks git submodule init git submodule update - cd deps/rust-sgx-sdk && git apply ../rust-sgx-sdk.patch + @# Try to apply the patches. If failed, check if the patches are already applied + cd deps/rust-sgx-sdk && git apply ../rust-sgx-sdk.patch >/dev/null 2>&1 || git apply ../rust-sgx-sdk.patch -R --check + cd deps/serde-json-sgx && git apply ../serde-json-sgx.patch >/dev/null 2>&1 || git apply ../serde-json-sgx.patch -R --check cd deps/sefs/sefs-fuse && make cd tools/ && make diff --git a/deps/itoa-sgx b/deps/itoa-sgx new file mode 160000 index 00000000..e35b4500 --- /dev/null +++ b/deps/itoa-sgx @@ -0,0 +1 @@ +Subproject commit e35b45000adf57e592ccd66273b607fcec998258 diff --git a/deps/rust-sgx-sdk b/deps/rust-sgx-sdk index a824416a..15b8470d 160000 --- a/deps/rust-sgx-sdk +++ b/deps/rust-sgx-sdk @@ -1 +1 @@ -Subproject commit a824416aba3840a2d76753b6da94130526b60893 +Subproject commit 15b8470dd50e9628e1cb7a0fdb08989f0b5ecc35 diff --git a/deps/rust-sgx-sdk.patch b/deps/rust-sgx-sdk.patch index 1546f14b..c0350a10 100644 --- a/deps/rust-sgx-sdk.patch +++ b/deps/rust-sgx-sdk.patch @@ -1,38 +1,38 @@ -From 5a6f0000e5a5d644e547fcf8a7c9c87f89ae5935 Mon Sep 17 00:00:00 2001 -From: Liu Shuang -Date: Tue, 6 Aug 2019 06:59:49 +0000 +From 45e0641710606f98ed295063d171ca62990d32f3 Mon Sep 17 00:00:00 2001 +From: LI Qing +Date: Tue, 7 Jan 2020 12:20:05 +0000 Subject: [PATCH] Add support for integrity-only SGX protected files 1. Add SgxFile::open_integrity_only API -1. Add SgxFile::create_integrity_only API -2. Add the unit test for integrity-only SgxFile +2. Add SgxFile::create_integrity_only API +3. Add the unit test for integrity-only SgxFile --- samplecode/unit-test/enclave/src/lib.rs | 2 + samplecode/unit-test/enclave/src/test_file.rs | 41 +++++++++++++ - sgx_tprotected_fs/src/fs.rs | 86 +++++++++++++++++++++++++++ - sgx_tstd/src/sgxfs.rs | 39 +++++++++++- - sgx_tstd/src/sys/sgxfs.rs | 40 +++++++++++-- - sgx_types/src/function.rs | 4 ++ - 6 files changed, 205 insertions(+), 7 deletions(-) + sgx_tprotected_fs/src/fs.rs | 84 +++++++++++++++++++++++++++ + sgx_tstd/src/sgxfs.rs | 39 ++++++++++++- + sgx_tstd/src/sys/sgxfs.rs | 39 +++++++++++-- + sgx_types/src/function.rs | 3 + + 6 files changed, 201 insertions(+), 7 deletions(-) diff --git a/samplecode/unit-test/enclave/src/lib.rs b/samplecode/unit-test/enclave/src/lib.rs -index e368e26..45579da 100644 +index c04cb4d..14a6d63 100644 --- a/samplecode/unit-test/enclave/src/lib.rs +++ b/samplecode/unit-test/enclave/src/lib.rs -@@ -148,6 +148,8 @@ fn test_main_entrance() -> sgx_status_t { - test_serialize_enum, - // std::sgxfs - test_sgxfs, -+ // std::sgxfs in integrity-only mode -+ test_sgxfs_integrity_only, - // std::fs - test_fs, - // std::fs untrusted mode +@@ -157,6 +157,8 @@ fn test_main_entrance() -> size_t { + test_serialize_enum, + // std::sgxfs + test_sgxfs, ++ // std::sgxfs in integrity-only mode ++ test_sgxfs_integrity_only, + // std::fs + test_fs, + // std::fs untrusted mode diff --git a/samplecode/unit-test/enclave/src/test_file.rs b/samplecode/unit-test/enclave/src/test_file.rs -index e9a85a7..0dbc805 100644 +index 5e7466e..8b8d6d0 100644 --- a/samplecode/unit-test/enclave/src/test_file.rs +++ b/samplecode/unit-test/enclave/src/test_file.rs -@@ -138,3 +138,44 @@ pub fn test_fs_untrusted_fs_feature_enabled() { +@@ -128,3 +128,44 @@ pub fn test_fs_untrusted_fs_feature_enabled() { assert!(f.is_ok()); } } @@ -78,15 +78,14 @@ index e9a85a7..0dbc805 100644 + assert!(remove_result.is_ok()); +} diff --git a/sgx_tprotected_fs/src/fs.rs b/sgx_tprotected_fs/src/fs.rs -index d1e438c..b9e508f 100644 +index 64d85d0..9ded4e8 100644 --- a/sgx_tprotected_fs/src/fs.rs +++ b/sgx_tprotected_fs/src/fs.rs -@@ -47,6 +47,16 @@ unsafe fn rsgx_fopen(filename: &CStr, mode: &CStr, key: &sgx_key_128bit_t) -> Sy +@@ -35,6 +35,15 @@ unsafe fn rsgx_fopen(filename: &CStr, mode: &CStr, key: &sgx_key_128bit_t) -> Sy } } +unsafe fn rsgx_fopen_integrity_only(filename: &CStr, mode: &CStr) -> SysResult { -+ + let file = sgx_fopen_integrity_only(filename.as_ptr(), mode.as_ptr()); + if file.is_null() { + Err(errno()) @@ -96,14 +95,13 @@ index d1e438c..b9e508f 100644 +} + unsafe fn rsgx_fopen_auto_key(filename: &CStr, mode: &CStr) -> SysResult { - let file = sgx_fopen_auto_key(filename.as_ptr(), mode.as_ptr()); -@@ -218,6 +228,16 @@ unsafe fn rsgx_fimport_auto_key(filename: &CStr, key: &sgx_key_128bit_t) -> SysE + if file.is_null() { +@@ -193,6 +202,15 @@ unsafe fn rsgx_fimport_auto_key(filename: &CStr, key: &sgx_key_128bit_t) -> SysE } } +unsafe fn rsgx_fget_mac(stream: SGX_FILE, mac: &mut sgx_aes_gcm_128bit_tag_t) -> SysError { -+ + let ret = sgx_fget_mac(stream, mac as * mut sgx_aes_gcm_128bit_tag_t); + if ret == 0 { + Ok(()) @@ -115,7 +113,7 @@ index d1e438c..b9e508f 100644 pub struct SgxFileStream { stream: SGX_FILE } -@@ -303,6 +323,48 @@ impl SgxFileStream { +@@ -278,6 +296,48 @@ impl SgxFileStream { } /// @@ -138,8 +136,8 @@ index d1e438c..b9e508f 100644 + /// + /// **mode** + /// -+ /// The file open mode string. Allowed values are any combination of ‘r’, ‘w’ or ‘a’, with possible ‘+’ -+ /// and possible ‘b’ (since string functions are currently not sup- ported, ‘b’ is meaningless). ++ /// The file open mode string. Allowed values are any combination of, or, with possible ++ /// and possible (since string functions are currently not sup- ported, is meaningless). + /// + /// # Requirements + /// @@ -164,7 +162,7 @@ index d1e438c..b9e508f 100644 /// The read function reads the requested amount of data from the file, and extends the file pointer by that amount. /// /// # Description -@@ -542,6 +604,30 @@ impl SgxFileStream { +@@ -517,6 +577,30 @@ impl SgxFileStream { pub fn clear_cache(&self) -> SysError { unsafe { rsgx_fclear_cache(self.stream) } } @@ -196,19 +194,19 @@ index d1e438c..b9e508f 100644 /// diff --git a/sgx_tstd/src/sgxfs.rs b/sgx_tstd/src/sgxfs.rs -index b03d174..1b2ce52 100644 +index b07aaf2..ccb7f93 100644 --- a/sgx_tstd/src/sgxfs.rs +++ b/sgx_tstd/src/sgxfs.rs -@@ -28,7 +28,7 @@ +@@ -17,7 +17,7 @@ //! Filesystem manipulation operations. --use sgx_types::sgx_key_128bit_t; -+use sgx_types::{sgx_key_128bit_t, sgx_aes_gcm_128bit_tag_t}; - use io::{self, SeekFrom, Seek, Read, Initializer, Write}; - use path::Path; - use sys::sgxfs as fs_imp; -@@ -120,6 +120,19 @@ impl SgxFile { +-use sgx_types::{sgx_key_128bit_t, sgx_align_key_128bit_t}; ++use sgx_types::{sgx_key_128bit_t, sgx_align_key_128bit_t, sgx_aes_gcm_128bit_tag_t}; + use crate::io::{self, SeekFrom, Seek, Read, Initializer, Write}; + use crate::path::Path; + use crate::sys::sgxfs as fs_imp; +@@ -109,6 +109,19 @@ impl SgxFile { OpenOptions::new().read(true).open(path.as_ref()) } @@ -228,7 +226,7 @@ index b03d174..1b2ce52 100644 /// Opens a file in write-only mode. /// /// This function will create a file if it does not exist, -@@ -129,6 +142,15 @@ impl SgxFile { +@@ -118,6 +131,15 @@ impl SgxFile { OpenOptions::new().write(true).open(path.as_ref()) } @@ -244,7 +242,7 @@ index b03d174..1b2ce52 100644 pub fn open_ex>(path: P, key: &sgx_key_128bit_t) -> io::Result { OpenOptions::new().read(true).open_ex(path.as_ref(), key) } -@@ -148,6 +170,12 @@ impl SgxFile { +@@ -137,6 +159,12 @@ impl SgxFile { pub fn clear_cache(&self) -> io::Result<()> { self.inner.clear_cache() } @@ -257,7 +255,7 @@ index b03d174..1b2ce52 100644 } impl AsInner for SgxFile { -@@ -284,6 +312,10 @@ impl OpenOptions { +@@ -273,6 +301,10 @@ impl OpenOptions { self._open_ex(path.as_ref(), key) } @@ -268,7 +266,7 @@ index b03d174..1b2ce52 100644 fn _open(&self, path: &Path) -> io::Result { let inner = fs_imp::SgxFile::open(path, &self.0)?; Ok(SgxFile { inner: inner }) -@@ -293,6 +325,11 @@ impl OpenOptions { +@@ -282,6 +314,11 @@ impl OpenOptions { let inner = fs_imp::SgxFile::open_ex(path, &self.0, key)?; Ok(SgxFile { inner: inner }) } @@ -281,19 +279,19 @@ index b03d174..1b2ce52 100644 impl AsInnerMut for OpenOptions { diff --git a/sgx_tstd/src/sys/sgxfs.rs b/sgx_tstd/src/sys/sgxfs.rs -index a32814d..ebc3627 100644 +index 7b47471..9735193 100644 --- a/sgx_tstd/src/sys/sgxfs.rs +++ b/sgx_tstd/src/sys/sgxfs.rs -@@ -26,7 +26,7 @@ - // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +@@ -15,7 +15,7 @@ + // specific language governing permissions and limitations + // under the License.. --use sgx_types::{sgx_status_t, sgx_key_128bit_t}; -+use sgx_types::{sgx_status_t, sgx_key_128bit_t, sgx_aes_gcm_128bit_tag_t}; +-use sgx_types::{sgx_status_t, sgx_key_128bit_t, sgx_align_key_128bit_t}; ++use sgx_types::{sgx_status_t, sgx_key_128bit_t, sgx_align_key_128bit_t, sgx_aes_gcm_128bit_tag_t}; use sgx_trts::libc; use sgx_tprotected_fs::{self, SgxFileStream}; - use os::unix::prelude::*; -@@ -87,7 +87,7 @@ impl SgxFile { + use crate::os::unix::prelude::*; +@@ -76,7 +76,7 @@ impl SgxFile { let path = cstr(path)?; let mode = opts.get_access_mode()?; let opts = CString::new(mode.as_bytes())?; @@ -302,7 +300,7 @@ index a32814d..ebc3627 100644 } pub fn open_ex(path: &Path, opts: &OpenOptions, key: &sgx_key_128bit_t) -> io::Result { -@@ -95,12 +95,23 @@ impl SgxFile { +@@ -84,12 +84,22 @@ impl SgxFile { let path = cstr(path)?; let mode = opts.get_access_mode()?; let opts = CString::new(mode.as_bytes())?; @@ -318,7 +316,6 @@ index a32814d..ebc3627 100644 + let mode = opts.get_access_mode()?; + let opts = CString::new(mode.as_bytes())?; + SgxFile::open_c(&path, &opts, &sgx_key_128bit_t::default(), false, true) -+ + } + + pub fn open_c(path: &CStr, opts: &CStr, key: &sgx_key_128bit_t, auto: bool, integrity_only: bool) -> io::Result { @@ -329,7 +326,7 @@ index a32814d..ebc3627 100644 SgxFileStream::open_auto_key(path, opts) } else { SgxFileStream::open(path, opts, key) -@@ -233,6 +244,23 @@ impl SgxFile { +@@ -222,6 +232,23 @@ impl SgxFile { } }) } @@ -353,7 +350,7 @@ index a32814d..ebc3627 100644 } pub fn remove(path: &Path) -> io::Result<()> { -@@ -324,4 +352,4 @@ pub fn copy(from: &Path, to: &Path) -> io::Result { +@@ -331,4 +358,4 @@ pub fn copy(from: &Path, to: &Path) -> io::Result { let ret = io::copy(&mut reader, &mut writer)?; fs::set_permissions(to, perm)?; Ok(ret) @@ -361,24 +358,23 @@ index a32814d..ebc3627 100644 \ No newline at end of file +} diff --git a/sgx_types/src/function.rs b/sgx_types/src/function.rs -index 91869f7..fdd8a04 100644 +index 5bb06e0..4e8c7bc 100644 --- a/sgx_types/src/function.rs +++ b/sgx_types/src/function.rs -@@ -551,6 +551,8 @@ extern { +@@ -609,6 +609,8 @@ extern { - pub fn sgx_fopen_auto_key(filename: * const ::c_char, mode: * const ::c_char) -> SGX_FILE; + pub fn sgx_fopen_auto_key(filename: * const c_char, mode: * const c_char) -> SGX_FILE; -+ pub fn sgx_fopen_integrity_only(filename: * const ::c_char, mode: * const ::c_char) -> SGX_FILE; ++ pub fn sgx_fopen_integrity_only(filename: * const c_char, mode: * const c_char) -> SGX_FILE; + - pub fn sgx_fwrite(ptr: * const ::c_void, - size: ::size_t, - count: ::size_t, -@@ -582,6 +584,8 @@ extern { - pub fn sgx_fimport_auto_key(filename: * const ::c_char, key: * const sgx_key_128bit_t) -> ::int32_t; - - pub fn sgx_fclear_cache(stream: SGX_FILE) -> ::int32_t; -+ -+ pub fn sgx_fget_mac(stream: SGX_FILE, mac: * mut sgx_aes_gcm_128bit_tag_t) -> ::int32_t; + pub fn sgx_fwrite(ptr: * const c_void, + size: size_t, + count: size_t, +@@ -630,6 +632,7 @@ extern { + pub fn sgx_fexport_auto_key(filename: * const c_char, key: * mut sgx_key_128bit_t) -> int32_t; + pub fn sgx_fimport_auto_key(filename: * const c_char, key: * const sgx_key_128bit_t) -> int32_t; + pub fn sgx_fclear_cache(stream: SGX_FILE) -> int32_t; ++ pub fn sgx_fget_mac(stream: SGX_FILE, mac: * mut sgx_aes_gcm_128bit_tag_t) -> int32_t; } /* intel sgx sdk 2.0 */ diff --git a/deps/sefs b/deps/sefs index 96fbb3ed..8379fe27 160000 --- a/deps/sefs +++ b/deps/sefs @@ -1 +1 @@ -Subproject commit 96fbb3ed48ec949dd3aa0d34b8a54205bd8e09d3 +Subproject commit 8379fe273871de8fcfedf01f3b95ec73c91d548c diff --git a/deps/serde-json-sgx b/deps/serde-json-sgx new file mode 160000 index 00000000..c0a62f63 --- /dev/null +++ b/deps/serde-json-sgx @@ -0,0 +1 @@ +Subproject commit c0a62f63fafdfbbbd5b89a6ad517373b93ccd41f diff --git a/deps/serde-json-sgx.patch b/deps/serde-json-sgx.patch new file mode 100644 index 00000000..7b837ed9 --- /dev/null +++ b/deps/serde-json-sgx.patch @@ -0,0 +1,38 @@ +From 64bafe1617c776fcbcb5e1587841396dc62abdc5 Mon Sep 17 00:00:00 2001 +From: LI Qing +Date: Mon, 13 Jan 2020 06:22:07 +0000 +Subject: [PATCH] Modify Cargo.toml's dependency to use path instead of git url + +--- + Cargo.toml | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Cargo.toml b/Cargo.toml +index 096e9f3..bab974a 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -17,9 +17,9 @@ travis-ci = { repository = "serde-rs/json" } + appveyor = { repository = "serde-rs/json" } + + [dependencies] +-serde = { git = "https://github.com/mesalock-linux/serde-sgx.git" } +-indexmap = { git = "https://github.com/mesalock-linux/indexmap-sgx.git", optional = true } +-itoa = { git = "https://github.com/mesalock-linux/itoa-sgx.git" } ++serde = { path = "../serde-sgx/serde" } ++#indexmap = { git = "https://github.com/mesalock-linux/indexmap-sgx.git", optional = true } ++itoa = { path = "../itoa-sgx" } + ryu = "1.0" + sgx_tstd = { rev = "v1.1.0", git = "https://github.com/apache/teaclave-sgx-sdk.git", optional = true } + +@@ -49,7 +49,7 @@ default = ["mesalock_sgx"] + # Use a different representation for the map type of serde_json::Value. + # This allows data to be read into a Value and written back to a JSON string + # while preserving the order of map keys in the input. +-preserve_order = ["indexmap"] ++#preserve_order = ["indexmap"] + + # Use an arbitrary precision number representation for serde_json::Number. This + # allows JSON numbers of arbitrary size/precision to be read into a Number and +-- +2.7.4 + diff --git a/deps/serde-sgx b/deps/serde-sgx new file mode 160000 index 00000000..c945ac9a --- /dev/null +++ b/deps/serde-sgx @@ -0,0 +1 @@ +Subproject commit c945ac9aeb23dc799070f3afaf590a6c3ac2c1a2 diff --git a/src/libos/Cargo.lock b/src/libos/Cargo.lock index 6e6fbc99..3afbdb1c 100644 --- a/src/libos/Cargo.lock +++ b/src/libos/Cargo.lock @@ -4,32 +4,32 @@ name = "Occlum" version = "0.8.0" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "derive_builder 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "rcore-fs 0.1.0", "rcore-fs-mountfs 0.1.0", "rcore-fs-ramfs 0.1.0", "rcore-fs-sefs 0.1.0", - "serde 1.0.84", - "serde_json 1.0.36", - "sgx_tcrypto 1.0.6", - "sgx_trts 1.0.6", - "sgx_tse 1.0.6", - "sgx_tstd 1.0.6", - "sgx_types 1.0.6", + "serde 1.0.104", + "serde_json 1.0.40", + "sgx_tcrypto 1.1.0", + "sgx_trts 1.1.0", + "sgx_tse 1.1.0", + "sgx_tstd 1.1.0", + "sgx_types 1.1.0", "xmas-elf 0.6.2", ] [[package]] name = "autocfg" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bitflags" -version = "1.0.4" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -37,9 +37,14 @@ name = "bitvec" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "cc" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "cfg-if" -version = "0.1.6" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -47,7 +52,7 @@ name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -67,9 +72,9 @@ dependencies = [ "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "ident_case 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -78,8 +83,8 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "darling_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -90,8 +95,8 @@ dependencies = [ "darling 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "derive_builder_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -101,8 +106,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "darling 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -122,30 +127,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "itoa" -version = "0.4.1" +version = "0.4.4" dependencies = [ - "sgx_tstd 1.0.6", + "sgx_tstd 1.1.0", ] [[package]] name = "lazy_static" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libc" -version = "0.2.62" +version = "0.2.66" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "log" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -156,21 +161,37 @@ dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "proc-macro2" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "quote" -version = "0.6.12" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "quote" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -187,7 +208,7 @@ name = "rand_chacha" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -225,7 +246,7 @@ name = "rand_jitter" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -237,7 +258,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -248,7 +269,7 @@ name = "rand_pcg" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -264,26 +285,26 @@ dependencies = [ name = "rcore-fs" version = "0.1.0" dependencies = [ - "spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rcore-fs-mountfs" version = "0.1.0" dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "rcore-fs 0.1.0", - "spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rcore-fs-ramfs" version = "0.1.0" dependencies = [ - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "rcore-fs 0.1.0", - "spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -291,10 +312,10 @@ name = "rcore-fs-sefs" version = "0.1.0" dependencies = [ "bitvec 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "rcore-fs 0.1.0", - "spin 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "static_assertions 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "static_assertions 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -308,121 +329,143 @@ dependencies = [ [[package]] name = "ryu" -version = "0.2.8" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.84" +version = "1.0.104" dependencies = [ - "serde_derive 1.0.84", - "sgx_tstd 1.0.6", + "serde_derive 1.0.104", + "sgx_tstd 1.1.0", ] [[package]] name = "serde_derive" -version = "1.0.84" +version = "1.0.104" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.36" +version = "1.0.40" dependencies = [ - "itoa 0.4.1", - "ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.84", - "sgx_tstd 1.0.6", + "itoa 0.4.4", + "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104", + "sgx_tstd 1.1.0", ] [[package]] name = "sgx_alloc" -version = "1.0.6" +version = "1.1.0" + +[[package]] +name = "sgx_backtrace_sys" +version = "1.1.0" dependencies = [ - "sgx_trts 1.0.6", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "sgx_build_helper 0.1.0", + "sgx_libc 1.1.0", ] [[package]] name = "sgx_build_helper" version = "0.1.0" +[[package]] +name = "sgx_demangle" +version = "1.1.0" + [[package]] name = "sgx_libc" -version = "1.0.6" +version = "1.1.0" dependencies = [ - "sgx_types 1.0.6", + "sgx_types 1.1.0", ] [[package]] name = "sgx_tcrypto" -version = "1.0.6" +version = "1.1.0" dependencies = [ - "sgx_types 1.0.6", + "sgx_types 1.1.0", ] [[package]] name = "sgx_tprotected_fs" -version = "1.0.6" +version = "1.1.0" dependencies = [ - "sgx_trts 1.0.6", - "sgx_types 1.0.6", + "sgx_trts 1.1.0", + "sgx_types 1.1.0", ] [[package]] name = "sgx_trts" -version = "1.0.6" +version = "1.1.0" dependencies = [ - "sgx_libc 1.0.6", - "sgx_types 1.0.6", + "sgx_libc 1.1.0", + "sgx_types 1.1.0", ] [[package]] name = "sgx_tse" -version = "1.0.6" +version = "1.1.0" dependencies = [ - "sgx_types 1.0.6", + "sgx_types 1.1.0", +] + +[[package]] +name = "sgx_tseal" +version = "1.1.0" +dependencies = [ + "sgx_tcrypto 1.1.0", + "sgx_trts 1.1.0", + "sgx_tse 1.1.0", + "sgx_types 1.1.0", ] [[package]] name = "sgx_tstd" -version = "1.0.6" +version = "1.1.0" dependencies = [ - "sgx_alloc 1.0.6", - "sgx_build_helper 0.1.0", - "sgx_libc 1.0.6", - "sgx_tprotected_fs 1.0.6", - "sgx_trts 1.0.6", - "sgx_types 1.0.6", - "sgx_unwind 0.0.1", + "sgx_alloc 1.1.0", + "sgx_backtrace_sys 1.1.0", + "sgx_demangle 1.1.0", + "sgx_libc 1.1.0", + "sgx_tprotected_fs 1.1.0", + "sgx_trts 1.1.0", + "sgx_tseal 1.1.0", + "sgx_types 1.1.0", + "sgx_unwind 0.1.0", ] [[package]] name = "sgx_types" -version = "1.0.6" +version = "1.1.0" [[package]] name = "sgx_unwind" -version = "0.0.1" +version = "0.1.0" dependencies = [ - "sgx_trts 1.0.6", + "sgx_build_helper 0.1.0", ] [[package]] name = "spin" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "spin" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "static_assertions" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -432,19 +475,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.15.39" +version = "0.15.44" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "syn" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "unicode-xid" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "uuid" version = "0.7.4" @@ -485,10 +543,11 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] -"checksum autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b671c8fb71b457dd4ae18c4ba1e59aa81793daacc361d82fcd410cef0d491875" -"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" +"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" +"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" "checksum bitvec 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cfadef5c4e2c2e64067b9ecc061179f12ac7ec65ba613b1f60f3972bbada1f5b" -"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" +"checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" +"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum darling 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fcfbcb0c5961907597a7d1148e3af036268f2b773886b8bb3eeb1e1281d3d3d6" "checksum darling_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6afc018370c3bff3eb51f89256a6bdb18b4fdcda72d577982a14954a7a0b402c" @@ -498,11 +557,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" "checksum ident_case 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" -"checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba" -"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" +"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" +"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -"checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" +"checksum proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "0319972dcae462681daf4da1adeeaa066e3ebd29c69be96c6abb1259d2ee2bcc" +"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" @@ -514,13 +575,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -"checksum ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "b96a9549dc8d48f2c283938303c4b5a77aa29bfbc5b54b084fb1630408899a8f" -"checksum spin 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "37b5646825922b96b5d7d676b5bb3458a54498e96ed7b0ce09dc43a07038fea4" -"checksum spin 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" -"checksum static_assertions 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "389ce475f424f267dbed6479cbd8f126c5e1afb053b0acdaa019c74305fc65d1" +"checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" +"checksum spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ceac490aa12c567115b40b7b7fceca03a6c9d53d5defea066123debc83c5dc1f" +"checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +"checksum static_assertions 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7f3eb36b47e512f8f1c9e3d10c2c1965bc992bd9cdb024fa581e2194501c83d3" "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" -"checksum syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d960b829a55e56db167e861ddb43602c003c7be0bee1d345021703fac2fb7c" +"checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" +"checksum syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1e4ff033220a41d1a57d8125eab57bf5263783dfdcc18688b1dacc6ce9651ef8" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" "checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" diff --git a/src/libos/Cargo.toml b/src/libos/Cargo.toml index 40ec8ccf..d501b7fb 100644 --- a/src/libos/Cargo.toml +++ b/src/libos/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "Occlum" version = "0.8.0" +edition = "2018" [lib] name = "occlum_libos_core_rs" @@ -15,8 +16,11 @@ rcore-fs = { path = "../../deps/sefs/rcore-fs" } rcore-fs-sefs = { path = "../../deps/sefs/rcore-fs-sefs" } rcore-fs-ramfs = { path = "../../deps/sefs/rcore-fs-ramfs" } rcore-fs-mountfs = { path = "../../deps/sefs/rcore-fs-mountfs" } -serde = { path = "../../deps/rust-sgx-sdk/third_party/serde-rs/serde/serde", features = ["derive"] } -serde_json = { path = "../../deps/rust-sgx-sdk/third_party/serde-rs/json" } +serde = { path = "../../deps/serde-sgx/serde", features = ["derive"] } +serde_json = { path = "../../deps/serde-json-sgx" } + +[patch.'https://github.com/apache/teaclave-sgx-sdk.git'] +sgx_tstd = { path = "../../deps/rust-sgx-sdk/sgx_tstd" } [features] default = ["integrity_only_opt", "sgx_file_cache"] diff --git a/src/libos/Makefile b/src/libos/Makefile index f2514dfe..3105a821 100644 --- a/src/libos/Makefile +++ b/src/libos/Makefile @@ -132,7 +132,7 @@ $(BUILD_DIR)/src/libos/src/Enclave_t.o: $(BUILD_DIR)/src/libos/src/Enclave_t.c @echo "CC <= $@" $(BUILD_DIR)/src/libos/src/Enclave_t.c: $(SGX_EDGER8R) ../Enclave.edl - @cd $(BUILD_DIR)/src/libos/src && $(SGX_EDGER8R) --trusted $(CUR_DIR)/../Enclave.edl --search-path $(SGX_SDK)/include --search-path $(RUST_SGX_SDK_DIR)/edl/ + @cd $(BUILD_DIR)/src/libos/src && $(SGX_EDGER8R) --trusted $(CUR_DIR)/../Enclave.edl --search-path $(SGX_SDK)/include --search-path $(RUST_SGX_SDK_DIR)/edl @echo "GEN <= $@" $(BUILD_DIR)/src/libos/%.o: %.c diff --git a/src/libos/rust-toolchain b/src/libos/rust-toolchain new file mode 100644 index 00000000..7ff88f6e --- /dev/null +++ b/src/libos/rust-toolchain @@ -0,0 +1 @@ +nightly-2019-11-25 diff --git a/src/libos/src/fs/dev_null.rs b/src/libos/src/fs/dev_null.rs index 8b665dba..e62d4407 100644 --- a/src/libos/src/fs/dev_null.rs +++ b/src/libos/src/fs/dev_null.rs @@ -16,7 +16,7 @@ impl File for DevNull { Ok(bufs.iter().map(|buf| buf.len()).sum()) } - fn as_any(&self) -> &Any { + fn as_any(&self) -> &dyn Any { self } } diff --git a/src/libos/src/fs/dev_random.rs b/src/libos/src/fs/dev_random.rs index 35b45257..ca37beb9 100644 --- a/src/libos/src/fs/dev_random.rs +++ b/src/libos/src/fs/dev_random.rs @@ -41,7 +41,7 @@ impl File for DevRandom { Ok(total_nbytes) } - fn as_any(&self) -> &Any { + fn as_any(&self) -> &dyn Any { self } } diff --git a/src/libos/src/fs/dev_sgx/mod.rs b/src/libos/src/fs/dev_sgx/mod.rs index 5a084f44..5e65b316 100644 --- a/src/libos/src/fs/dev_sgx/mod.rs +++ b/src/libos/src/fs/dev_sgx/mod.rs @@ -67,7 +67,7 @@ impl File for DevSgx { Ok(()) } - fn as_any(&self) -> &Any { + fn as_any(&self) -> &dyn Any { self } } diff --git a/src/libos/src/fs/dev_zero.rs b/src/libos/src/fs/dev_zero.rs index 35e35a1f..ba8b2294 100644 --- a/src/libos/src/fs/dev_zero.rs +++ b/src/libos/src/fs/dev_zero.rs @@ -23,7 +23,7 @@ impl File for DevZero { Ok(total_nbytes) } - fn as_any(&self) -> &Any { + fn as_any(&self) -> &dyn Any { self } } diff --git a/src/libos/src/fs/file.rs b/src/libos/src/fs/file.rs index 36f83dcc..5618ffa2 100644 --- a/src/libos/src/fs/file.rs +++ b/src/libos/src/fs/file.rs @@ -83,10 +83,10 @@ pub trait File: Debug + Sync + Send + Any { return_op_unsupported_error!("set_status_flags") } - fn as_any(&self) -> &Any; + fn as_any(&self) -> &dyn Any; } -pub type FileRef = Arc>; +pub type FileRef = Arc>; #[derive(Debug)] #[repr(C)] @@ -162,7 +162,7 @@ impl File for SgxFile { inner.seek(pos) } - fn as_any(&self) -> &Any { + fn as_any(&self) -> &dyn Any { self } } @@ -429,7 +429,7 @@ impl File for StdoutFile { Ok(()) } - fn as_any(&self) -> &Any { + fn as_any(&self) -> &dyn Any { self } } @@ -504,7 +504,7 @@ impl File for StdinFile { }) } - fn as_any(&self) -> &Any { + fn as_any(&self) -> &dyn Any { self } } diff --git a/src/libos/src/fs/hostfs.rs b/src/libos/src/fs/hostfs.rs index 4bbc5223..0e7b5a6d 100644 --- a/src/libos/src/fs/hostfs.rs +++ b/src/libos/src/fs/hostfs.rs @@ -27,7 +27,7 @@ impl FileSystem for HostFS { Ok(()) } - fn root_inode(&self) -> Arc { + fn root_inode(&self) -> Arc { Arc::new(HNode { path: self.path.clone(), file: Mutex::new(None), @@ -136,7 +136,7 @@ impl INode for HNode { })) } - fn link(&self, name: &str, other: &Arc) -> Result<()> { + fn link(&self, name: &str, other: &Arc) -> Result<()> { let other = other.downcast_ref::().ok_or(FsError::NotSameFs)?; try_std!(fs::hard_link(&other.path, &self.path.join(name))); Ok(()) @@ -155,11 +155,11 @@ impl INode for HNode { Ok(()) } - fn move_(&self, old_name: &str, target: &Arc, new_name: &str) -> Result<()> { + fn move_(&self, old_name: &str, target: &Arc, new_name: &str) -> Result<()> { unimplemented!() } - fn find(&self, name: &str) -> Result> { + fn find(&self, name: &str) -> Result> { let new_path = self.path.join(name); if !new_path.exists() { return Err(FsError::EntryNotFound); @@ -193,11 +193,11 @@ impl INode for HNode { Ok(()) } - fn fs(&self) -> Arc { + fn fs(&self) -> Arc { self.fs.clone() } - fn as_any_ref(&self) -> &Any { + fn as_any_ref(&self) -> &dyn Any { self } } @@ -250,7 +250,7 @@ trait IntoFsMetadata { impl IntoFsMetadata for fs::Metadata { fn into_fs_metadata(self) -> Metadata { - use libc; + use sgx_trts::libc; use std::os::fs::MetadataExt; Metadata { dev: self.st_dev() as usize, diff --git a/src/libos/src/fs/inode_file.rs b/src/libos/src/fs/inode_file.rs index a267ac24..d47fb3a9 100644 --- a/src/libos/src/fs/inode_file.rs +++ b/src/libos/src/fs/inode_file.rs @@ -4,7 +4,7 @@ use sgx_trts::libc::S_IRUSR; use std::fmt; pub struct INodeFile { - inode: Arc, + inode: Arc, abs_path: String, offset: SgxMutex, access_mode: AccessMode, @@ -159,13 +159,13 @@ impl File for INodeFile { Ok(()) } - fn as_any(&self) -> &Any { + fn as_any(&self) -> &dyn Any { self } } impl INodeFile { - pub fn open(inode: Arc, abs_path: &str, flags: u32) -> Result { + pub fn open(inode: Arc, abs_path: &str, flags: u32) -> Result { let access_mode = AccessMode::from_u32(flags)?; if (access_mode.readable() && !inode.allow_read()?) { return_errno!(EBADF, "File not readable"); @@ -207,7 +207,7 @@ pub trait INodeExt { fn allow_read(&self) -> Result; } -impl INodeExt for INode { +impl INodeExt for dyn INode { fn read_as_vec(&self) -> Result> { let size = self.metadata()?.size; let mut buf = Vec::with_capacity(size); diff --git a/src/libos/src/fs/io_multiplexing.rs b/src/libos/src/fs/io_multiplexing.rs index faa1ef1b..4696973d 100644 --- a/src/libos/src/fs/io_multiplexing.rs +++ b/src/libos/src/fs/io_multiplexing.rs @@ -159,7 +159,7 @@ pub fn do_epoll_create1(flags: c_int) -> Result { info!("epoll_create1: flags: {}", flags); let epoll = EpollFile::new()?; - let file_ref: Arc> = Arc::new(Box::new(epoll)); + let file_ref: Arc> = Arc::new(Box::new(epoll)); let current_ref = process::get_current(); let mut proc = current_ref.lock().unwrap(); let fd = { @@ -308,7 +308,7 @@ impl Drop for EpollFileInner { } impl File for EpollFile { - fn as_any(&self) -> &Any { + fn as_any(&self) -> &dyn Any { self } } diff --git a/src/libos/src/fs/mod.rs b/src/libos/src/fs/mod.rs index c776eb47..0d9b174e 100644 --- a/src/libos/src/fs/mod.rs +++ b/src/libos/src/fs/mod.rs @@ -24,7 +24,7 @@ pub use self::root_inode::ROOT_INODE; pub use self::unix_socket::{AsUnixSocket, UnixSocketFile}; use sgx_trts::libc::S_IWUSR; use std::any::Any; -use std::mem::uninitialized; +use std::mem::MaybeUninit; mod access; mod dev_null; @@ -54,7 +54,7 @@ pub fn do_open(path: &str, flags: u32, mode: u32) -> Result { let mut proc = current_ref.lock().unwrap(); let file = proc.open_file(path, flags, mode)?; - let file_ref: Arc> = Arc::new(file); + let file_ref: Arc> = Arc::new(file); let fd = { let creation_flags = CreationFlags::from_bits_truncate(flags); @@ -402,7 +402,7 @@ pub fn do_sendfile( let in_file = file_table.get(in_fd)?; let out_file = file_table.get(out_fd)?; - let mut buffer: [u8; 1024 * 11] = unsafe { uninitialized() }; + let mut buffer: [u8; 1024 * 11] = unsafe { MaybeUninit::uninit().assume_init() }; let mut read_offset = match offset { Some(offset) => offset, @@ -441,7 +441,7 @@ extern "C" { impl Process { /// Open a file on the process. But DO NOT add it to file table. - pub fn open_file(&self, path: &str, flags: u32, mode: u32) -> Result> { + pub fn open_file(&self, path: &str, flags: u32, mode: u32) -> Result> { if path == "/dev/null" { return Ok(Box::new(DevNull)); } @@ -481,7 +481,7 @@ impl Process { } /// Lookup INode from the cwd of the process - pub fn lookup_inode(&self, path: &str) -> Result> { + pub fn lookup_inode(&self, path: &str) -> Result> { debug!("lookup_inode: cwd: {:?}, path: {:?}", self.get_cwd(), path); if path.len() > 0 && path.as_bytes()[0] == b'/' { // absolute path diff --git a/src/libos/src/fs/pipe.rs b/src/libos/src/fs/pipe.rs index 71e85f90..b5b1d6c8 100644 --- a/src/libos/src/fs/pipe.rs +++ b/src/libos/src/fs/pipe.rs @@ -60,7 +60,7 @@ impl File for PipeReader { Ok(total_bytes) } - fn as_any(&self) -> &Any { + fn as_any(&self) -> &dyn Any { self } } @@ -107,7 +107,7 @@ impl File for PipeWriter { return_errno!(ESPIPE, "Pipe does not support seek") } - fn as_any(&self) -> &Any { + fn as_any(&self) -> &dyn Any { self } } diff --git a/src/libos/src/fs/root_inode.rs b/src/libos/src/fs/root_inode.rs index 86751ce4..0bb1ab12 100644 --- a/src/libos/src/fs/root_inode.rs +++ b/src/libos/src/fs/root_inode.rs @@ -12,8 +12,8 @@ use rcore_fs_sefs::SEFS; lazy_static! { /// The root of file system - pub static ref ROOT_INODE: Arc = { - fn init_root_inode() -> Result> { + pub static ref ROOT_INODE: Arc = { + fn init_root_inode() -> Result> { let mount_config = &config::LIBOS_CONFIG.mount; let root_inode = { let rootfs = open_root_fs_according_to(mount_config)?; diff --git a/src/libos/src/fs/sgx_impl.rs b/src/libos/src/fs/sgx_impl.rs index f8eae5d9..62f4b51e 100644 --- a/src/libos/src/fs/sgx_impl.rs +++ b/src/libos/src/fs/sgx_impl.rs @@ -1,5 +1,5 @@ use super::sgx_aes_gcm_128bit_tag_t; -use alloc::prelude::ToString; +use alloc::string::ToString; use rcore_fs::dev::TimeProvider; use rcore_fs::vfs::Timespec; use rcore_fs_sefs::dev::*; @@ -104,7 +104,7 @@ impl SgxStorage { } impl Storage for SgxStorage { - fn open(&self, file_id: &str) -> DevResult> { + fn open(&self, file_id: &str) -> DevResult> { let locked_file = self.get(file_id, |this| { let mut path = this.path.to_path_buf(); path.push(file_id); @@ -143,7 +143,7 @@ impl Storage for SgxStorage { Ok(Box::new(locked_file)) } - fn create(&self, file_id: &str) -> DevResult> { + fn create(&self, file_id: &str) -> DevResult> { let locked_file = self.get(file_id, |this| { let mut path = this.path.to_path_buf(); path.push(file_id); diff --git a/src/libos/src/fs/unix_socket.rs b/src/libos/src/fs/unix_socket.rs index d8354d2e..65fe37ce 100644 --- a/src/libos/src/fs/unix_socket.rs +++ b/src/libos/src/fs/unix_socket.rs @@ -1,5 +1,5 @@ use super::*; -use alloc::prelude::ToString; +use alloc::string::ToString; use std::collections::btree_map::BTreeMap; use std::fmt; use std::sync::atomic::{spin_loop_hint, AtomicUsize, Ordering}; @@ -83,7 +83,7 @@ impl File for UnixSocketFile { inner.ioctl(cmd) } - fn as_any(&self) -> &Any { + fn as_any(&self) -> &dyn Any { self } } diff --git a/src/libos/src/lib.rs b/src/libos/src/lib.rs index 031aa7ef..b3fc4be8 100644 --- a/src/libos/src/lib.rs +++ b/src/libos/src/lib.rs @@ -3,9 +3,7 @@ #![crate_type = "staticlib"] #![cfg_attr(not(target_env = "sgx"), no_std)] #![cfg_attr(target_env = "sgx", feature(rustc_private))] -#![feature(alloc)] #![feature(allocator_api)] -#![feature(range_contains)] #![feature(core_intrinsics)] #![feature(stmt_expr_attributes)] #![feature(atomic_min_max)] diff --git a/src/libos/src/net/socket_file/mod.rs b/src/libos/src/net/socket_file/mod.rs index 2232e339..52575477 100644 --- a/src/libos/src/net/socket_file/mod.rs +++ b/src/libos/src/net/socket_file/mod.rs @@ -135,7 +135,7 @@ impl File for SocketFile { Ok(()) } - fn as_any(&self) -> &Any { + fn as_any(&self) -> &dyn Any { self } } diff --git a/src/libos/src/process/sched.rs b/src/libos/src/process/sched.rs index 5125b999..44516ed7 100644 --- a/src/libos/src/process/sched.rs +++ b/src/libos/src/process/sched.rs @@ -64,7 +64,7 @@ impl CpuSet { impl std::fmt::LowerHex for CpuSet { fn fmt(&self, fmtr: &mut std::fmt::Formatter) -> std::fmt::Result { for byte in &(self.vec) { - try!(fmtr.write_fmt(format_args!("{:02x}", byte))); + fmtr.write_fmt(format_args!("{:02x}", byte))?; } Ok(()) } @@ -73,7 +73,7 @@ impl std::fmt::LowerHex for CpuSet { impl std::fmt::UpperHex for CpuSet { fn fmt(&self, fmtr: &mut std::fmt::Formatter) -> std::fmt::Result { for byte in &(self.vec) { - try!(fmtr.write_fmt(format_args!("{:02X}", byte))); + fmtr.write_fmt(format_args!("{:02X}", byte))?; } Ok(()) } diff --git a/src/libos/src/process/spawn/mod.rs b/src/libos/src/process/spawn/mod.rs index a7d045de..06c5cfbd 100644 --- a/src/libos/src/process/spawn/mod.rs +++ b/src/libos/src/process/spawn/mod.rs @@ -142,7 +142,7 @@ fn init_files(parent_ref: &ProcessRef, file_actions: &[FileAction]) -> Result { let file = parent.open_file(path.as_str(), oflag, mode)?; - let file_ref: Arc> = Arc::new(file); + let file_ref: Arc> = Arc::new(file); let creation_flags = CreationFlags::from_bits_truncate(oflag); cloned_file_table.put_at(fd, file_ref, creation_flags.must_close_on_spawn()); } @@ -166,8 +166,8 @@ fn init_files(parent_ref: &ProcessRef, file_actions: &[FileAction]) -> Result> = Arc::new(Box::new(StdinFile::new())); - let stdout: Arc> = Arc::new(Box::new(StdoutFile::new())); + let stdin: Arc> = Arc::new(Box::new(StdinFile::new())); + let stdout: Arc> = Arc::new(Box::new(StdoutFile::new())); // TODO: implement and use a real stderr let stderr = stdout.clone(); file_table.put(stdin, false); diff --git a/src/libos/src/syscall/mod.rs b/src/libos/src/syscall/mod.rs index 90a3b44d..4860d935 100644 --- a/src/libos/src/syscall/mod.rs +++ b/src/libos/src/syscall/mod.rs @@ -1077,7 +1077,7 @@ fn do_socket(domain: c_int, socket_type: c_int, protocol: c_int) -> Result> = match domain { + let file_ref: Arc> = match domain { libc::AF_LOCAL => { let unix_socket = UnixSocketFile::new(socket_type, protocol)?; Arc::new(Box::new(unix_socket)) @@ -1136,7 +1136,7 @@ fn do_accept4( let socket = file_ref.as_socket()?; let new_socket = socket.accept(addr, addr_len, flags)?; - let new_file_ref: Arc> = Arc::new(Box::new(new_socket)); + let new_file_ref: Arc> = Arc::new(Box::new(new_socket)); let new_fd = proc.get_files().lock().unwrap().put(new_file_ref, false); Ok(new_fd as isize) @@ -1145,7 +1145,7 @@ fn do_accept4( check_mut_ptr(addr)?; // TODO: check addr_len let new_socket = unix_socket.accept()?; - let new_file_ref: Arc> = Arc::new(Box::new(new_socket)); + let new_file_ref: Arc> = Arc::new(Box::new(new_socket)); let new_fd = proc.get_files().lock().unwrap().put(new_file_ref, false); Ok(new_fd as isize) diff --git a/src/sgxenv.mk b/src/sgxenv.mk index 43081f2e..83537764 100644 --- a/src/sgxenv.mk +++ b/src/sgxenv.mk @@ -41,7 +41,6 @@ else endif RUST_SGX_SDK_DIR := $(PROJECT_DIR)/deps/rust-sgx-sdk -SGX_COMMON_CFLAGS += -I$(RUST_SGX_SDK_DIR)/common/ -I$(RUST_SGX_SDK_DIR)/edl/ ifneq ($(SGX_MODE), HW) Urts_Library_Name := sgx_urts_sim @@ -64,7 +63,8 @@ ProtectedFs_Library_Name := sgx_tprotected_fs # # Export flags used to compile or link untrusted modules # -SGX_CFLAGS_U := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes -I$(SGX_SDK)/include +SGX_CFLAGS_U := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes \ + -I$(RUST_SGX_SDK_DIR)/edl -I$(SGX_SDK)/include SGX_CXXFLAGS_U := $(SGX_CFLAGS_U) -std=c++11 SGX_LFLAGS_U := $(SGX_COMMON_CFLAGS) -lpthread -L$(SGX_LIBRARY_PATH) -l$(Urts_Library_Name) @@ -78,7 +78,7 @@ endif # Export flags used to compile or link untrusted modules # SGX_CFLAGS_T := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -fstack-protector \ - -I$(RUST_SGX_SDK_DIR)/common/inc/ -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc + -I$(RUST_SGX_SDK_DIR)/common/inc -I$(RUST_SGX_SDK_DIR)/edl -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc SGX_CXXFLAGS_T := $(SGX_CFLAGS_T) -std=c++11 -nostdinc++ -I$(SGX_SDK)/include/libcxx # Before use this linker flag, the user should define $(_Other_Enclave_Libs), @@ -105,7 +105,7 @@ SGX_CXXFLAGS_T := $(SGX_CFLAGS_T) -std=c++11 -nostdinc++ -I$(SGX_SDK)/include/li # linked. SGX_LFLAGS_T = $(SGX_COMMON_CFLAGS) -nostdlib -L$(SGX_LIBRARY_PATH) $(_Other_Link_Flags) \ -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \ - -Wl,--start-group -lsgx_tstdc -lsgx_tcxx -l$(Crypto_Library_Name) -l$(Service_Library_Name) $(_Other_Enclave_Libs) -Wl,--end-group \ + -Wl,--start-group -lsgx_tcxx -lsgx_tstdc -l$(Crypto_Library_Name) -l$(Service_Library_Name) $(_Other_Enclave_Libs) -Wl,--end-group \ -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ -Wl,-pie,-eenclave_entry -Wl,--export-dynamic \ -Wl,--defsym,__ImageBase=0 \ diff --git a/tools/docker/Dockerfile.centos7.2 b/tools/docker/Dockerfile.centos7.2 index 324becd9..d02ce1f6 100644 --- a/tools/docker/Dockerfile.centos7.2 +++ b/tools/docker/Dockerfile.centos7.2 @@ -52,16 +52,15 @@ RUN wget http://www.etallen.com/cpuid/cpuid-20180519.x86_64.tar.gz && \ # Install SGX SDK WORKDIR /tmp -RUN git clone https://github.com/occlum/linux-sgx && \ +RUN git clone -b sgx_2.7.1_for_occlum https://github.com/occlum/linux-sgx && \ cd linux-sgx && \ ./download_prebuilt.sh && \ - ./compile.sh && \ - ./install.sh && \ + ./compile_and_install.sh && \ echo 'source /opt/intel/sgxsdk/environment' >> /root/.bashrc && \ rm -rf /tmp/linux-sgx # Install Rust -ENV OCCLUM_RUST_VERSION=nightly-2019-01-28 +ENV OCCLUM_RUST_VERSION=nightly-2019-11-25 RUN curl https://sh.rustup.rs -sSf | \ sh -s -- --default-toolchain ${OCCLUM_RUST_VERSION} -y && \ rm -rf /root/.cargo/registry && rm -rf /root/.cargo/git diff --git a/tools/docker/Dockerfile.ubuntu16.04 b/tools/docker/Dockerfile.ubuntu16.04 index a661f1b0..019c5159 100644 --- a/tools/docker/Dockerfile.ubuntu16.04 +++ b/tools/docker/Dockerfile.ubuntu16.04 @@ -52,15 +52,15 @@ RUN wget http://www.etallen.com/cpuid/cpuid-20180519.x86_64.tar.gz && \ # Install SGX SDK WORKDIR /tmp -RUN git clone https://github.com/occlum/linux-sgx . && \ +RUN git clone -b sgx_2.7.1_for_occlum https://github.com/occlum/linux-sgx && \ + cd linux-sgx && \ ./download_prebuilt.sh && \ - ./compile.sh && \ - ./install.sh && \ + ./compile_and_install.sh && \ echo 'source /opt/intel/sgxsdk/environment' >> /root/.bashrc && \ rm -rf /tmp/linux-sgx # Install Rust -ENV OCCLUM_RUST_VERSION=nightly-2019-01-28 +ENV OCCLUM_RUST_VERSION=nightly-2019-11-25 RUN curl https://sh.rustup.rs -sSf | \ sh -s -- --default-toolchain ${OCCLUM_RUST_VERSION} -y && \ rm -rf /root/.cargo/registry && rm -rf /root/.cargo/git diff --git a/tools/docker/start_aesm.sh b/tools/docker/start_aesm.sh index a5f4108b..caee22f4 100755 --- a/tools/docker/start_aesm.sh +++ b/tools/docker/start_aesm.sh @@ -1,5 +1,5 @@ #!/bin/bash # Start AESM service required by Intel SGX SDK if it is not running if ! pgrep "aesm_service" > /dev/null ; then - /opt/intel/sgxpsw/aesm/aesm_service + LD_LIBRARY_PATH="/opt/intel/sgxpsw/aesm:$LD_LIBRARY_PATH" /opt/intel/sgxpsw/aesm/aesm_service fi