Update the sdk version to 2.9.1

Fix std::alloc::Alloc not found
The lastest Rust changes the trait to std::alloc::AllocRef.

Update the docker files to support sgx 2.9.1

Remove the compilerRT dependency for rust sdk update
This commit is contained in:
Zongmin 2020-05-09 12:05:11 +08:00 committed by Tate, Hongliang Tian
parent 1d1330772c
commit a6d97d5b4f
15 changed files with 286 additions and 287 deletions

2
deps/rust-sgx-sdk vendored

@ -1 +1 @@
Subproject commit 15b8470dd50e9628e1cb7a0fdb08989f0b5ecc35 Subproject commit df76765f586cf103189a5e62355672c96f4920ce

@ -1,25 +1,8 @@
From 45e0641710606f98ed295063d171ca62990d32f3 Mon Sep 17 00:00:00 2001
From: LI Qing <geding.lq@alibaba-inc.com>
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
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 | 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 diff --git a/samplecode/unit-test/enclave/src/lib.rs b/samplecode/unit-test/enclave/src/lib.rs
index c04cb4d..14a6d63 100644 index b9ea49be..d740753f 100644
--- a/samplecode/unit-test/enclave/src/lib.rs --- a/samplecode/unit-test/enclave/src/lib.rs
+++ b/samplecode/unit-test/enclave/src/lib.rs +++ b/samplecode/unit-test/enclave/src/lib.rs
@@ -157,6 +157,8 @@ fn test_main_entrance() -> size_t { @@ -166,6 +166,8 @@ fn test_main_entrance() -> size_t {
test_serialize_enum, test_serialize_enum,
// std::sgxfs // std::sgxfs
test_sgxfs, test_sgxfs,
@ -29,7 +12,7 @@ index c04cb4d..14a6d63 100644
test_fs, test_fs,
// std::fs untrusted mode // std::fs untrusted mode
diff --git a/samplecode/unit-test/enclave/src/test_file.rs b/samplecode/unit-test/enclave/src/test_file.rs diff --git a/samplecode/unit-test/enclave/src/test_file.rs b/samplecode/unit-test/enclave/src/test_file.rs
index 5e7466e..8b8d6d0 100644 index 766ba674..eeefd9eb 100644
--- a/samplecode/unit-test/enclave/src/test_file.rs --- a/samplecode/unit-test/enclave/src/test_file.rs
+++ b/samplecode/unit-test/enclave/src/test_file.rs +++ b/samplecode/unit-test/enclave/src/test_file.rs
@@ -128,3 +128,44 @@ pub fn test_fs_untrusted_fs_feature_enabled() { @@ -128,3 +128,44 @@ pub fn test_fs_untrusted_fs_feature_enabled() {
@ -78,7 +61,7 @@ index 5e7466e..8b8d6d0 100644
+ assert!(remove_result.is_ok()); + assert!(remove_result.is_ok());
+} +}
diff --git a/sgx_tprotected_fs/src/fs.rs b/sgx_tprotected_fs/src/fs.rs diff --git a/sgx_tprotected_fs/src/fs.rs b/sgx_tprotected_fs/src/fs.rs
index 64d85d0..9ded4e8 100644 index 93767e4b..9ddac357 100644
--- a/sgx_tprotected_fs/src/fs.rs --- a/sgx_tprotected_fs/src/fs.rs
+++ b/sgx_tprotected_fs/src/fs.rs +++ b/sgx_tprotected_fs/src/fs.rs
@@ -35,6 +35,15 @@ 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
@ -97,7 +80,7 @@ index 64d85d0..9ded4e8 100644
unsafe fn rsgx_fopen_auto_key(filename: &CStr, mode: &CStr) -> SysResult<SGX_FILE> { unsafe fn rsgx_fopen_auto_key(filename: &CStr, mode: &CStr) -> SysResult<SGX_FILE> {
let file = sgx_fopen_auto_key(filename.as_ptr(), mode.as_ptr()); let file = sgx_fopen_auto_key(filename.as_ptr(), mode.as_ptr());
if file.is_null() { if file.is_null() {
@@ -193,6 +202,15 @@ unsafe fn rsgx_fimport_auto_key(filename: &CStr, key: &sgx_key_128bit_t) -> SysE @@ -192,6 +201,15 @@ unsafe fn rsgx_fimport_auto_key(filename: &CStr, key: &sgx_key_128bit_t) -> SysE
} }
} }
@ -113,10 +96,11 @@ index 64d85d0..9ded4e8 100644
pub struct SgxFileStream { pub struct SgxFileStream {
stream: SGX_FILE stream: SGX_FILE
} }
@@ -278,6 +296,48 @@ impl SgxFileStream { @@ -275,6 +293,48 @@ impl SgxFileStream {
}
} }
/// + ///
+ /// The open function creates or opens a protected file in the integrity-only mode. + /// The open function creates or opens a protected file in the integrity-only mode.
+ /// + ///
+ /// # Description + /// # Description
@ -158,11 +142,10 @@ index 64d85d0..9ded4e8 100644
+ } + }
+ } + }
+ +
+ /// ///
/// The read function reads the requested amount of data from the file, and extends the file pointer by that amount. /// The read function reads the requested amount of data from the file, and extends the file pointer by that amount.
/// ///
/// # Description @@ -515,6 +575,30 @@ impl SgxFileStream {
@@ -517,6 +577,30 @@ impl SgxFileStream {
pub fn clear_cache(&self) -> SysError { pub fn clear_cache(&self) -> SysError {
unsafe { rsgx_fclear_cache(self.stream) } unsafe { rsgx_fclear_cache(self.stream) }
} }
@ -194,7 +177,7 @@ index 64d85d0..9ded4e8 100644
/// ///
diff --git a/sgx_tstd/src/sgxfs.rs b/sgx_tstd/src/sgxfs.rs diff --git a/sgx_tstd/src/sgxfs.rs b/sgx_tstd/src/sgxfs.rs
index b07aaf2..ccb7f93 100644 index 91b42d78..2c1af77a 100644
--- a/sgx_tstd/src/sgxfs.rs --- a/sgx_tstd/src/sgxfs.rs
+++ b/sgx_tstd/src/sgxfs.rs +++ b/sgx_tstd/src/sgxfs.rs
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
@ -279,7 +262,7 @@ index b07aaf2..ccb7f93 100644
impl AsInnerMut<fs_imp::OpenOptions> for OpenOptions { impl AsInnerMut<fs_imp::OpenOptions> for OpenOptions {
diff --git a/sgx_tstd/src/sys/sgxfs.rs b/sgx_tstd/src/sys/sgxfs.rs diff --git a/sgx_tstd/src/sys/sgxfs.rs b/sgx_tstd/src/sys/sgxfs.rs
index 7b47471..9735193 100644 index 7d6f24f3..0a6acef9 100644
--- a/sgx_tstd/src/sys/sgxfs.rs --- a/sgx_tstd/src/sys/sgxfs.rs
+++ b/sgx_tstd/src/sys/sgxfs.rs +++ b/sgx_tstd/src/sys/sgxfs.rs
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
@ -291,7 +274,7 @@ index 7b47471..9735193 100644
use sgx_trts::libc; use sgx_trts::libc;
use sgx_tprotected_fs::{self, SgxFileStream}; use sgx_tprotected_fs::{self, SgxFileStream};
use crate::os::unix::prelude::*; use crate::os::unix::prelude::*;
@@ -76,7 +76,7 @@ impl SgxFile { @@ -75,18 +75,29 @@ impl SgxFile {
let path = cstr(path)?; let path = cstr(path)?;
let mode = opts.get_access_mode()?; let mode = opts.get_access_mode()?;
let opts = CString::new(mode.as_bytes())?; let opts = CString::new(mode.as_bytes())?;
@ -300,7 +283,6 @@ index 7b47471..9735193 100644
} }
pub fn open_ex(path: &Path, opts: &OpenOptions, key: &sgx_key_128bit_t) -> io::Result<SgxFile> { pub fn open_ex(path: &Path, opts: &OpenOptions, key: &sgx_key_128bit_t) -> io::Result<SgxFile> {
@@ -84,12 +84,22 @@ impl SgxFile {
let path = cstr(path)?; let path = cstr(path)?;
let mode = opts.get_access_mode()?; let mode = opts.get_access_mode()?;
let opts = CString::new(mode.as_bytes())?; let opts = CString::new(mode.as_bytes())?;
@ -309,9 +291,9 @@ index 7b47471..9735193 100644
} }
- pub fn open_c(path: &CStr, opts: &CStr, key: &sgx_key_128bit_t, auto: bool) -> io::Result<SgxFile> { - pub fn open_c(path: &CStr, opts: &CStr, key: &sgx_key_128bit_t, auto: bool) -> io::Result<SgxFile> {
+ pub fn open_integrity_only(path: &Path, opts: &OpenOptions) -> io::Result<SgxFile> {
- let file = if auto == true { - let file = if auto == true {
+ pub fn open_integrity_only(path: &Path, opts: &OpenOptions) -> io::Result<SgxFile> {
+
+ let path = cstr(path)?; + let path = cstr(path)?;
+ let mode = opts.get_access_mode()?; + let mode = opts.get_access_mode()?;
+ let opts = CString::new(mode.as_bytes())?; + let opts = CString::new(mode.as_bytes())?;
@ -326,7 +308,7 @@ index 7b47471..9735193 100644
SgxFileStream::open_auto_key(path, opts) SgxFileStream::open_auto_key(path, opts)
} else { } else {
SgxFileStream::open(path, opts, key) SgxFileStream::open(path, opts, key)
@@ -222,6 +232,23 @@ impl SgxFile { @@ -213,6 +224,23 @@ impl SgxFile {
} }
}) })
} }
@ -350,34 +332,27 @@ index 7b47471..9735193 100644
} }
pub fn remove(path: &Path) -> io::Result<()> { pub fn remove(path: &Path) -> io::Result<()> {
@@ -331,4 +358,4 @@ pub fn copy(from: &Path, to: &Path) -> io::Result<u64> {
let ret = io::copy(&mut reader, &mut writer)?;
fs::set_permissions(to, perm)?;
Ok(ret)
-}
\ No newline at end of file
+}
diff --git a/sgx_types/src/function.rs b/sgx_types/src/function.rs diff --git a/sgx_types/src/function.rs b/sgx_types/src/function.rs
index 5bb06e0..4e8c7bc 100644 index 3c2db3a4..f96cd9e8 100644
--- a/sgx_types/src/function.rs --- a/sgx_types/src/function.rs
+++ b/sgx_types/src/function.rs +++ b/sgx_types/src/function.rs
@@ -609,6 +609,8 @@ extern { @@ -629,7 +629,10 @@ extern "C" {
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_fwrite(ptr: *const c_void,
+
+ 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, + pub fn sgx_fwrite(ptr: * const c_void,
size: size_t, size: size_t,
count: size_t, count: size_t,
@@ -630,6 +632,7 @@ extern { stream: SGX_FILE) -> size_t;
pub fn sgx_fexport_auto_key(filename: * const c_char, key: * mut sgx_key_128bit_t) -> int32_t; @@ -650,6 +653,7 @@ extern "C" {
pub fn sgx_fimport_auto_key(filename: * const c_char, key: * const sgx_key_128bit_t) -> int32_t; 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_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_fget_mac(stream: SGX_FILE, mac: * mut sgx_aes_gcm_128bit_tag_t) -> int32_t;
} }
/* intel sgx sdk 2.0 */ /* intel sgx sdk 2.0 */
--
2.7.4

2
deps/sefs vendored

@ -1 +1 @@
Subproject commit 12ddbb4f6356a1496cf818b4f043bbe9931b8c96 Subproject commit 1fbb90706e77a3fab46362abbcb1f4e3433cc261

413
src/libos/Cargo.lock generated

@ -4,599 +4,600 @@
name = "Occlum" name = "Occlum"
version = "0.11.0" version = "0.11.0"
dependencies = [ dependencies = [
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags",
"bitvec 0.17.4 (registry+https://github.com/rust-lang/crates.io-index)", "bitvec",
"derive_builder 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "derive_builder",
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "log",
"rcore-fs 0.1.0", "rcore-fs",
"rcore-fs-mountfs 0.1.0", "rcore-fs-mountfs",
"rcore-fs-ramfs 0.1.0", "rcore-fs-ramfs",
"rcore-fs-sefs 0.1.0", "rcore-fs-sefs",
"serde 1.0.104", "serde",
"serde_json 1.0.40", "serde_json",
"sgx_tcrypto 1.1.0", "sgx_tcrypto",
"sgx_trts 1.1.0", "sgx_trts",
"sgx_tse 1.1.0", "sgx_tse",
"sgx_tstd 1.1.0", "sgx_tstd",
"sgx_types 1.1.0", "sgx_types",
"xmas-elf 0.6.2", "xmas-elf",
] ]
[[package]] [[package]]
name = "autocfg" name = "autocfg"
version = "0.1.7" version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2"
[[package]]
name = "autocfg"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
[[package]] [[package]]
name = "bitflags" name = "bitflags"
version = "1.2.1" version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
[[package]] [[package]]
name = "bitvec" name = "bitvec"
version = "0.17.4" version = "0.17.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c"
dependencies = [ dependencies = [
"either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "either",
"radium 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "radium",
] ]
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.0.50" version = "1.0.52"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3d87b23d6a92cd03af510a5ade527033f6aa6fa92161e2d5863a907d4c5e31d"
[[package]] [[package]]
name = "cfg-if" name = "cfg-if"
version = "0.1.10" version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
[[package]] [[package]]
name = "cloudabi" name = "cloudabi"
version = "0.0.3" version = "0.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
dependencies = [ dependencies = [
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags",
] ]
[[package]] [[package]]
name = "darling" name = "darling"
version = "0.9.0" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcfbcb0c5961907597a7d1148e3af036268f2b773886b8bb3eeb1e1281d3d3d6"
dependencies = [ dependencies = [
"darling_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "darling_core",
"darling_macro 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "darling_macro",
] ]
[[package]] [[package]]
name = "darling_core" name = "darling_core"
version = "0.9.0" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6afc018370c3bff3eb51f89256a6bdb18b4fdcda72d577982a14954a7a0b402c"
dependencies = [ dependencies = [
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "fnv",
"ident_case 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "ident_case",
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.30",
"quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.13",
"strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "strsim",
"syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.44",
] ]
[[package]] [[package]]
name = "darling_macro" name = "darling_macro"
version = "0.9.0" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6d8dac1c6f1d29a41c4712b4400f878cb4fcc4c7628f298dd75038e024998d1"
dependencies = [ dependencies = [
"darling_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "darling_core",
"quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.13",
"syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.44",
] ]
[[package]] [[package]]
name = "derive_builder" name = "derive_builder"
version = "0.7.2" version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ac53fa6a3cda160df823a9346442525dcaf1e171999a1cf23e67067e4fd64d4"
dependencies = [ dependencies = [
"darling 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "darling",
"derive_builder_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "derive_builder_core",
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.30",
"quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.13",
"syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.44",
] ]
[[package]] [[package]]
name = "derive_builder_core" name = "derive_builder_core"
version = "0.5.0" version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0288a23da9333c246bb18c143426074a6ae96747995c5819d2947b64cd942b37"
dependencies = [ dependencies = [
"darling 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "darling",
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.30",
"quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.13",
"syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.15.44",
] ]
[[package]] [[package]]
name = "either" name = "either"
version = "1.5.3" version = "1.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
[[package]] [[package]]
name = "fnv" name = "fnv"
version = "1.0.6" version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
[[package]] [[package]]
name = "fuchsia-cprng" name = "fuchsia-cprng"
version = "0.1.1" version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
[[package]]
name = "hashbrown_tstd"
version = "0.7.1"
dependencies = [
"autocfg 1.0.0",
]
[[package]] [[package]]
name = "ident_case" name = "ident_case"
version = "1.0.1" version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]] [[package]]
name = "itoa" name = "itoa"
version = "0.4.5" version = "0.4.5"
dependencies = [ dependencies = [
"sgx_tstd 1.1.0", "sgx_tstd",
] ]
[[package]] [[package]]
name = "lazy_static" name = "lazy_static"
version = "1.4.0" version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
dependencies = [ dependencies = [
"spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "spin",
] ]
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.66" version = "0.2.69"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005"
[[package]] [[package]]
name = "log" name = "log"
version = "0.4.8" version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
dependencies = [ dependencies = [
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if",
] ]
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "0.4.30" version = "0.4.30"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
dependencies = [ dependencies = [
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0",
] ]
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.7" version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8872cf6f48eee44265156c111456a700ab3483686b3f96df4cf5481c89157319"
dependencies = [ dependencies = [
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.2.0",
] ]
[[package]] [[package]]
name = "quote" name = "quote"
version = "0.6.13" version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
dependencies = [ dependencies = [
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.30",
] ]
[[package]] [[package]]
name = "quote" name = "quote"
version = "1.0.2" version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c1f4b0efa5fc5e8ceb705136bfee52cfdb6a4e3509f770b478cd6ed434232a7"
dependencies = [ dependencies = [
"proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.12",
] ]
[[package]] [[package]]
name = "radium" name = "radium"
version = "0.3.0" version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac"
[[package]] [[package]]
name = "rand" name = "rand"
version = "0.6.5" version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca"
dependencies = [ dependencies = [
"autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "autocfg 0.1.7",
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "libc",
"rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha",
"rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2",
"rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc",
"rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_isaac",
"rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand_jitter",
"rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_os",
"rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_pcg",
"rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift",
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "winapi",
] ]
[[package]] [[package]]
name = "rand_chacha" name = "rand_chacha"
version = "0.1.1" version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef"
dependencies = [ dependencies = [
"autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "autocfg 0.1.7",
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1",
] ]
[[package]] [[package]]
name = "rand_core" name = "rand_core"
version = "0.3.1" version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
dependencies = [ dependencies = [
"rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2",
] ]
[[package]] [[package]]
name = "rand_core" name = "rand_core"
version = "0.4.2" version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
[[package]] [[package]]
name = "rand_hc" name = "rand_hc"
version = "0.1.0" version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4"
dependencies = [ dependencies = [
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1",
] ]
[[package]] [[package]]
name = "rand_isaac" name = "rand_isaac"
version = "0.1.1" version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08"
dependencies = [ dependencies = [
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1",
] ]
[[package]] [[package]]
name = "rand_jitter" name = "rand_jitter"
version = "0.1.4" version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b"
dependencies = [ dependencies = [
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "libc",
"rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2",
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "winapi",
] ]
[[package]] [[package]]
name = "rand_os" name = "rand_os"
version = "0.1.3" version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
dependencies = [ dependencies = [
"cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "cloudabi",
"fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng",
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "libc",
"rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2",
"rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand",
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "winapi",
] ]
[[package]] [[package]]
name = "rand_pcg" name = "rand_pcg"
version = "0.1.2" version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44"
dependencies = [ dependencies = [
"autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "autocfg 0.1.7",
"rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2",
] ]
[[package]] [[package]]
name = "rand_xorshift" name = "rand_xorshift"
version = "0.1.1" version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c"
dependencies = [ dependencies = [
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1",
] ]
[[package]] [[package]]
name = "rcore-fs" name = "rcore-fs"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "spin",
] ]
[[package]] [[package]]
name = "rcore-fs-mountfs" name = "rcore-fs-mountfs"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "log",
"rcore-fs 0.1.0", "rcore-fs",
"spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "spin",
] ]
[[package]] [[package]]
name = "rcore-fs-ramfs" name = "rcore-fs-ramfs"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "log",
"rcore-fs 0.1.0", "rcore-fs",
"spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "spin",
] ]
[[package]] [[package]]
name = "rcore-fs-sefs" name = "rcore-fs-sefs"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"bitvec 0.17.4 (registry+https://github.com/rust-lang/crates.io-index)", "bitvec",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "log",
"rcore-fs 0.1.0", "rcore-fs",
"spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "spin",
"static_assertions 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "static_assertions",
"uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", "uuid",
] ]
[[package]] [[package]]
name = "rdrand" name = "rdrand"
version = "0.4.0" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
dependencies = [ dependencies = [
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1",
] ]
[[package]] [[package]]
name = "ryu" name = "ryu"
version = "1.0.2" version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed3d612bc64430efeb3f7ee6ef26d590dce0c43249217bddc62112540c7941e1"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.104" version = "1.0.104"
dependencies = [ dependencies = [
"serde_derive 1.0.104", "serde_derive",
"sgx_tstd 1.1.0", "sgx_tstd",
] ]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.104" version = "1.0.104"
dependencies = [ dependencies = [
"proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.12",
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.4",
"syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.19",
] ]
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.40" version = "1.0.40"
dependencies = [ dependencies = [
"itoa 0.4.5", "itoa",
"ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "ryu",
"serde 1.0.104", "serde",
"sgx_tstd 1.1.0", "sgx_tstd",
] ]
[[package]] [[package]]
name = "sgx_alloc" name = "sgx_alloc"
version = "1.1.0" version = "1.1.2"
[[package]] [[package]]
name = "sgx_backtrace_sys" name = "sgx_backtrace_sys"
version = "1.1.0" version = "1.1.2"
dependencies = [ dependencies = [
"cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", "cc",
"sgx_build_helper 0.1.0", "sgx_build_helper",
"sgx_libc 1.1.0", "sgx_libc",
] ]
[[package]] [[package]]
name = "sgx_build_helper" name = "sgx_build_helper"
version = "0.1.0" version = "0.1.3"
[[package]] [[package]]
name = "sgx_demangle" name = "sgx_demangle"
version = "1.1.0" version = "1.1.2"
[[package]] [[package]]
name = "sgx_libc" name = "sgx_libc"
version = "1.1.0" version = "1.1.2"
dependencies = [ dependencies = [
"sgx_types 1.1.0", "sgx_types",
] ]
[[package]] [[package]]
name = "sgx_tcrypto" name = "sgx_tcrypto"
version = "1.1.0" version = "1.1.2"
dependencies = [ dependencies = [
"sgx_types 1.1.0", "sgx_types",
] ]
[[package]] [[package]]
name = "sgx_tprotected_fs" name = "sgx_tprotected_fs"
version = "1.1.0" version = "1.1.2"
dependencies = [ dependencies = [
"sgx_trts 1.1.0", "sgx_trts",
"sgx_types 1.1.0", "sgx_types",
] ]
[[package]] [[package]]
name = "sgx_trts" name = "sgx_trts"
version = "1.1.0" version = "1.1.2"
dependencies = [ dependencies = [
"sgx_libc 1.1.0", "sgx_libc",
"sgx_types 1.1.0", "sgx_types",
] ]
[[package]] [[package]]
name = "sgx_tse" name = "sgx_tse"
version = "1.1.0" version = "1.1.2"
dependencies = [ dependencies = [
"sgx_types 1.1.0", "sgx_types",
]
[[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]] [[package]]
name = "sgx_tstd" name = "sgx_tstd"
version = "1.1.0" version = "1.1.2"
dependencies = [ dependencies = [
"sgx_alloc 1.1.0", "hashbrown_tstd",
"sgx_backtrace_sys 1.1.0", "sgx_alloc",
"sgx_demangle 1.1.0", "sgx_backtrace_sys",
"sgx_libc 1.1.0", "sgx_demangle",
"sgx_tprotected_fs 1.1.0", "sgx_libc",
"sgx_trts 1.1.0", "sgx_tprotected_fs",
"sgx_tseal 1.1.0", "sgx_trts",
"sgx_types 1.1.0", "sgx_types",
"sgx_unwind 0.1.0", "sgx_unwind",
] ]
[[package]] [[package]]
name = "sgx_types" name = "sgx_types"
version = "1.1.0" version = "1.1.2"
[[package]] [[package]]
name = "sgx_unwind" name = "sgx_unwind"
version = "0.1.0" version = "0.1.1"
dependencies = [ dependencies = [
"sgx_build_helper 0.1.0", "sgx_build_helper",
] ]
[[package]] [[package]]
name = "spin" name = "spin"
version = "0.5.2" version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
[[package]] [[package]]
name = "static_assertions" name = "static_assertions"
version = "0.3.4" version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f3eb36b47e512f8f1c9e3d10c2c1965bc992bd9cdb024fa581e2194501c83d3"
[[package]] [[package]]
name = "strsim" name = "strsim"
version = "0.7.0" version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
[[package]] [[package]]
name = "syn" name = "syn"
version = "0.15.44" version = "0.15.44"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
dependencies = [ dependencies = [
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.30",
"quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.13",
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0",
] ]
[[package]] [[package]]
name = "syn" name = "syn"
version = "1.0.13" version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8e5aa70697bb26ee62214ae3288465ecec0000f05182f039b477001f08f5ae7"
dependencies = [ dependencies = [
"proc-macro2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.12",
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.4",
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.2.0",
] ]
[[package]] [[package]]
name = "unicode-xid" name = "unicode-xid"
version = "0.1.0" version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
[[package]] [[package]]
name = "unicode-xid" name = "unicode-xid"
version = "0.2.0" version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
[[package]] [[package]]
name = "uuid" name = "uuid"
version = "0.7.4" version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a"
dependencies = [ dependencies = [
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand",
] ]
[[package]] [[package]]
name = "winapi" name = "winapi"
version = "0.3.8" version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
dependencies = [ dependencies = [
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-i686-pc-windows-gnu",
"winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-x86_64-pc-windows-gnu",
] ]
[[package]] [[package]]
name = "winapi-i686-pc-windows-gnu" name = "winapi-i686-pc-windows-gnu"
version = "0.4.0" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]] [[package]]
name = "winapi-x86_64-pc-windows-gnu" name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]] [[package]]
name = "xmas-elf" name = "xmas-elf"
version = "0.6.2" version = "0.6.2"
dependencies = [ dependencies = [
"zero 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "zero",
] ]
[[package]] [[package]]
name = "zero" name = "zero"
version = "0.1.2" version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f1bc8a6b2005884962297587045002d8cfb8dcec9db332f4ca216ddc5de82c5"
[metadata]
"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.17.4 (registry+https://github.com/rust-lang/crates.io-index)" = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c"
"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"
"checksum darling_macro 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c6d8dac1c6f1d29a41c4712b4400f878cb4fcc4c7628f298dd75038e024998d1"
"checksum derive_builder 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ac53fa6a3cda160df823a9346442525dcaf1e171999a1cf23e67067e4fd64d4"
"checksum derive_builder_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0288a23da9333c246bb18c143426074a6ae96747995c5819d2947b64cd942b37"
"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
"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.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 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 radium 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac"
"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"
"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4"
"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08"
"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b"
"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
"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 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8"
"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.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"
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
"checksum zero 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5f1bc8a6b2005884962297587045002d8cfb8dcec9db332f4ca216ddc5de82c5"

@ -52,8 +52,6 @@ ONLY_REBUILD_BUILTIN ?= 0
LIBOS_SO := $(BUILD_DIR)/lib/libocclum-libos.so LIBOS_SO := $(BUILD_DIR)/lib/libocclum-libos.so
LIBOS_CORE_A := $(BUILD_DIR)/lib/libocclum-libos-core.a LIBOS_CORE_A := $(BUILD_DIR)/lib/libocclum-libos-core.a
LIBOS_CORE_RS_A := $(BUILD_DIR)/lib/libocclum_libos_core_rs.a LIBOS_CORE_RS_A := $(BUILD_DIR)/lib/libocclum_libos_core_rs.a
# The dependent libraries
LIBCOMPILER_RT_PATCH_A := $(BUILD_DIR)/lib/libcompiler-rt-patch.a
# All source code # All source code
RUST_SRCS := $(wildcard src/*.rs src/*/*.rs src/*/*/*.rs src/*/*/*/*.rs src/*/*/*/*/*.rs) RUST_SRCS := $(wildcard src/*.rs src/*/*.rs src/*/*/*.rs src/*/*/*/*.rs src/*/*/*/*/*.rs)
@ -90,7 +88,7 @@ C_FLAGS += -DOCCLUM_BUILTIN_VM_USER_SPACE_SIZE='($(OCCLUM_BUILTIN_VM_USER_SPACE_
endif endif
_Other_Link_Flags := -L$(RUST_SGX_SDK_DIR)/compiler-rt/ -L$(BUILD_DIR)/lib _Other_Link_Flags := -L$(RUST_SGX_SDK_DIR)/compiler-rt/ -L$(BUILD_DIR)/lib
_Other_Enclave_Libs := -lcompiler-rt-patch -locclum-libos-core -lsgx_tprotected_fs _Other_Enclave_Libs := -locclum-libos-core -lsgx_tprotected_fs
LINK_FLAGS := $(SGX_LFLAGS_T) LINK_FLAGS := $(SGX_LFLAGS_T)
.PHONY: all clean .PHONY: all clean
@ -146,15 +144,10 @@ $(BUILD_DIR)/src/libos/%.o: %.S
@$(CC) $(C_FLAGS) -c $< -o $@ @$(CC) $(C_FLAGS) -c $< -o $@
@echo "AS <= $@" @echo "AS <= $@"
$(LIBCOMPILER_RT_PATCH_A):
@$(MAKE) --no-print-directory -C $(RUST_SGX_SDK_DIR)/compiler-rt/ > /dev/null
@cp $(RUST_SGX_SDK_DIR)/compiler-rt/libcompiler-rt-patch.a $(LIBCOMPILER_RT_PATCH_A)
@echo "GEN <= $@"
clean-builtin: clean-builtin:
@-$(RM) -f $(BUILTIN_C_OBJS) @-$(RM) -f $(BUILTIN_C_OBJS)
clean: clean-builtin clean: clean-builtin
@-$(RM) -f $(LIBOS_SO) $(LIBOS_CORE_A) $(LIBOS_CORE_RS_A) \ @-$(RM) -f $(LIBOS_SO) $(LIBOS_CORE_A) $(LIBOS_CORE_RS_A) \
$(LIBCOMPILER_RT_PATCH_A) $(EDL_C_OBJS) $(EDL_C_SRCS) $(C_OBJS) $(CXX_OBJS) $(S_OBJS) $(EDL_C_OBJS) $(EDL_C_SRCS) $(C_OBJS) $(CXX_OBJS) $(S_OBJS)
@-$(RM) -rf $(RUST_TARGET_DIR) @-$(RM) -rf $(RUST_TARGET_DIR)

@ -1 +1 @@
nightly-2019-11-25 nightly-2020-04-07

@ -23,7 +23,7 @@ pub fn register_exception_handlers() {
} }
#[no_mangle] #[no_mangle]
extern "C" fn handle_exception(info: *mut sgx_exception_info_t) -> u32 { extern "C" fn handle_exception(info: *mut sgx_exception_info_t) -> i32 {
extern "C" { extern "C" {
fn __occlum_syscall_c_abi(num: u32, info: *mut sgx_exception_info_t) -> u32; fn __occlum_syscall_c_abi(num: u32, info: *mut sgx_exception_info_t) -> u32;
} }

@ -180,7 +180,7 @@ impl File for StdoutFile {
} }
let cmd_bits = cmd.cmd_num() as c_int; let cmd_bits = cmd.cmd_num() as c_int;
let cmd_arg_ptr = cmd.arg_ptr() as *const c_int; let cmd_arg_ptr = cmd.arg_ptr() as *mut c_int;
let host_stdout_fd = self.get_host_fd() as i32; let host_stdout_fd = self.get_host_fd() as i32;
try_libc!(libc::ocall::ioctl_arg1( try_libc!(libc::ocall::ioctl_arg1(
host_stdout_fd, host_stdout_fd,
@ -321,7 +321,7 @@ impl File for StdinFile {
} }
let cmd_bits = cmd.cmd_num() as c_int; let cmd_bits = cmd.cmd_num() as c_int;
let cmd_arg_ptr = cmd.arg_ptr() as *const c_int; let cmd_arg_ptr = cmd.arg_ptr() as *mut c_int;
let host_stdin_fd = self.get_host_fd() as i32; let host_stdin_fd = self.get_host_fd() as i32;
try_libc!(libc::ocall::ioctl_arg1( try_libc!(libc::ocall::ioctl_arg1(
host_stdin_fd, host_stdin_fd,

@ -108,7 +108,7 @@ impl File for SocketFile {
fn ioctl(&self, cmd: &mut IoctlCmd) -> Result<()> { fn ioctl(&self, cmd: &mut IoctlCmd) -> Result<()> {
let cmd_num = cmd.cmd_num() as c_int; let cmd_num = cmd.cmd_num() as c_int;
let cmd_arg_ptr = cmd.arg_ptr() as *const c_int; let cmd_arg_ptr = cmd.arg_ptr() as *mut c_int;
try_libc!(libc::ocall::ioctl_arg1(self.fd(), cmd_num, cmd_arg_ptr)); try_libc!(libc::ocall::ioctl_arg1(self.fd(), cmd_num, cmd_arg_ptr));
// FIXME: add sanity checks for results returned for socket-related ioctls // FIXME: add sanity checks for results returned for socket-related ioctls
cmd.validate_arg_val()?; cmd.validate_arg_val()?;

@ -1,14 +1,18 @@
use super::*; use super::*;
use std::alloc::{Alloc, AllocErr, Layout}; use std::alloc::{AllocErr, AllocInit, AllocRef, Layout, MemoryBlock};
use std::ptr::{self, NonNull}; use std::ptr::{self, write_bytes, NonNull};
/// The global memory allocator for untrusted memory /// The global memory allocator for untrusted memory
pub static mut UNTRUSTED_ALLOC: UntrustedAlloc = UntrustedAlloc; pub static mut UNTRUSTED_ALLOC: UntrustedAlloc = UntrustedAlloc;
pub struct UntrustedAlloc; pub struct UntrustedAlloc;
unsafe impl Alloc for UntrustedAlloc { unsafe impl AllocRef for UntrustedAlloc {
unsafe fn alloc(&mut self, layout: Layout) -> std::result::Result<NonNull<u8>, AllocErr> { fn alloc(
&mut self,
layout: Layout,
init: AllocInit,
) -> std::result::Result<MemoryBlock, AllocErr> {
if layout.size() == 0 { if layout.size() == 0 {
return Err(AllocErr); return Err(AllocErr);
} }
@ -29,6 +33,12 @@ unsafe impl Alloc for UntrustedAlloc {
return Err(AllocErr); return Err(AllocErr);
} }
if init == AllocInit::Zeroed {
unsafe {
write_bytes(mem_ptr, 0, layout.size());
}
}
// Sanity checks // Sanity checks
// Post-condition 1: alignment // Post-condition 1: alignment
debug_assert!(mem_ptr as usize % layout.align() == 0); debug_assert!(mem_ptr as usize % layout.align() == 0);
@ -37,7 +47,10 @@ unsafe impl Alloc for UntrustedAlloc {
mem_ptr as *const u8, mem_ptr as *const u8,
layout.size() layout.size()
)); ));
Ok(NonNull::new(mem_ptr).unwrap()) Ok(MemoryBlock {
ptr: NonNull::new(mem_ptr).unwrap(),
size: layout.size(),
})
} }
unsafe fn dealloc(&mut self, ptr: NonNull<u8>, layout: Layout) { unsafe fn dealloc(&mut self, ptr: NonNull<u8>, layout: Layout) {

@ -1,5 +1,5 @@
use super::*; use super::*;
use std::alloc::{Alloc, AllocErr, Layout}; use std::alloc::{AllocErr, AllocInit, AllocRef, Layout, MemoryBlock};
use std::ptr::NonNull; use std::ptr::NonNull;
use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::atomic::{AtomicUsize, Ordering};
@ -26,7 +26,13 @@ impl UntrustedSliceAlloc {
} }
let layout = Layout::from_size_align(buf_size, 1)?; let layout = Layout::from_size_align(buf_size, 1)?;
let buf_ptr = unsafe { UNTRUSTED_ALLOC.alloc(layout)?.as_ptr() }; let buf_ptr = unsafe {
UNTRUSTED_ALLOC
.alloc(layout, AllocInit::Uninitialized)?
.ptr
.as_ptr()
};
let buf_pos = AtomicUsize::new(0); let buf_pos = AtomicUsize::new(0);
Ok(Self { Ok(Self {
buf_ptr, buf_ptr,

@ -52,16 +52,20 @@ RUN wget http://www.etallen.com/cpuid/cpuid-20200211.x86_64.tar.gz && \
# Install SGX SDK # Install SGX SDK
WORKDIR /tmp WORKDIR /tmp
RUN git clone -b sgx_2.7.1_for_occlum https://github.com/occlum/linux-sgx && \ RUN git clone -b sgx_2.9.1_for_occlum https://github.com/occlum/linux-sgx && \
cd linux-sgx && \ cd linux-sgx && \
./download_prebuilt.sh && \ ./download_prebuilt.sh && \
cp ./external/toolset/as /usr/local/bin/ && \
cp ./external/toolset/ld /usr/local/bin/ && \
cp ./external/toolset/ld.gold /usr/local/bin/ && \
cp ./external/toolset/objdump /usr/local/bin/ && \
./compile_and_install.sh && \ ./compile_and_install.sh && \
echo 'source /opt/intel/sgxsdk/environment' >> /root/.bashrc && \ echo 'source /opt/intel/sgxsdk/environment' >> /root/.bashrc && \
rm -rf /tmp/linux-sgx rm -rf /tmp/linux-sgx
# Install Rust # Install Rust
ENV PATH="/root/.cargo/bin:$PATH" ENV PATH="/root/.cargo/bin:$PATH"
ENV OCCLUM_RUST_VERSION=nightly-2019-11-25 ENV OCCLUM_RUST_VERSION=nightly-2020-04-07
RUN curl https://sh.rustup.rs -sSf | \ RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain ${OCCLUM_RUST_VERSION} -y && \ sh -s -- --default-toolchain ${OCCLUM_RUST_VERSION} -y && \
rm -rf /root/.cargo/registry && rm -rf /root/.cargo/git && \ rm -rf /root/.cargo/registry && rm -rf /root/.cargo/git && \

@ -52,16 +52,20 @@ RUN wget http://www.etallen.com/cpuid/cpuid-20200211.x86_64.tar.gz && \
# Install SGX SDK # Install SGX SDK
WORKDIR /tmp WORKDIR /tmp
RUN git clone -b sgx_2.7.1_for_occlum https://github.com/occlum/linux-sgx && \ RUN git clone -b sgx_2.9.1_for_occlum https://github.com/occlum/linux-sgx && \
cd linux-sgx && \ cd linux-sgx && \
./download_prebuilt.sh && \ ./download_prebuilt.sh && \
cp ./external/toolset/as /usr/local/bin/ && \
cp ./external/toolset/ld /usr/local/bin/ && \
cp ./external/toolset/ld.gold /usr/local/bin/ && \
cp ./external/toolset/objdump /usr/local/bin/ && \
./compile_and_install.sh && \ ./compile_and_install.sh && \
echo 'source /opt/intel/sgxsdk/environment' >> /root/.bashrc && \ echo 'source /opt/intel/sgxsdk/environment' >> /root/.bashrc && \
rm -rf /tmp/linux-sgx rm -rf /tmp/linux-sgx
# Install Rust # Install Rust
ENV PATH="/root/.cargo/bin:$PATH" ENV PATH="/root/.cargo/bin:$PATH"
ENV OCCLUM_RUST_VERSION=nightly-2019-11-25 ENV OCCLUM_RUST_VERSION=nightly-2020-04-07
RUN curl https://sh.rustup.rs -sSf | \ RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain ${OCCLUM_RUST_VERSION} -y && \ sh -s -- --default-toolchain ${OCCLUM_RUST_VERSION} -y && \
rm -rf /root/.cargo/registry && rm -rf /root/.cargo/git && \ rm -rf /root/.cargo/registry && rm -rf /root/.cargo/git && \

@ -53,17 +53,21 @@ RUN wget http://www.etallen.com/cpuid/cpuid-20200211.x86_64.tar.gz && \
# Install SGX SDK # Install SGX SDK
WORKDIR /tmp WORKDIR /tmp
RUN git clone -b sgx_2.7.1_for_occlum https://github.com/occlum/linux-sgx && \ RUN git clone -b sgx_2.9.1_for_occlum https://github.com/occlum/linux-sgx && \
mkdir /etc/init && \ mkdir /etc/init && \
cd linux-sgx && \ cd linux-sgx && \
./download_prebuilt.sh && \ ./download_prebuilt.sh && \
cp ./external/toolset/as /usr/local/bin/ && \
cp ./external/toolset/ld /usr/local/bin/ && \
cp ./external/toolset/ld.gold /usr/local/bin/ && \
cp ./external/toolset/objdump /usr/local/bin/ && \
./compile_and_install.sh && \ ./compile_and_install.sh && \
echo 'source /opt/intel/sgxsdk/environment' >> /root/.bashrc && \ echo 'source /opt/intel/sgxsdk/environment' >> /root/.bashrc && \
rm -rf /tmp/linux-sgx rm -rf /tmp/linux-sgx
# Install Rust # Install Rust
ENV PATH="/root/.cargo/bin:$PATH" ENV PATH="/root/.cargo/bin:$PATH"
ENV OCCLUM_RUST_VERSION=nightly-2019-11-25 ENV OCCLUM_RUST_VERSION=nightly-2020-04-07
RUN curl https://sh.rustup.rs -sSf | \ RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain ${OCCLUM_RUST_VERSION} -y && \ sh -s -- --default-toolchain ${OCCLUM_RUST_VERSION} -y && \
rm -rf /root/.cargo/registry && rm -rf /root/.cargo/git && \ rm -rf /root/.cargo/registry && rm -rf /root/.cargo/git && \

@ -166,7 +166,6 @@ cmd_build() {
cp "$occlum_dir/$build_dir/bin/occlum-run" build/bin/ cp "$occlum_dir/$build_dir/bin/occlum-run" build/bin/
mkdir -p build/lib mkdir -p build/lib
cp "$occlum_dir/$build_dir/lib/libocclum-libos-core.a" build/lib/ cp "$occlum_dir/$build_dir/lib/libocclum-libos-core.a" build/lib/
cp "$occlum_dir/$build_dir/lib/libcompiler-rt-patch.a" build/lib/
cp "$occlum_dir/$build_dir/lib/libocclum-pal.so" build/lib/ cp "$occlum_dir/$build_dir/lib/libocclum-pal.so" build/lib/
mkdir -p build/src/libos/src/builtin mkdir -p build/src/libos/src/builtin