diff --git a/demos/embedded_mode/README.md b/demos/embedded_mode/README.md index c42ad474..ec856289 100644 --- a/demos/embedded_mode/README.md +++ b/demos/embedded_mode/README.md @@ -1,4 +1,4 @@ -# A Demo for Occlum's Embedded Mode +# A Demo for Occlum's Embedded Mode ## Background @@ -9,7 +9,7 @@ application by partitioning it into trusted and untrusted halves, while the LibOS-based approach runs the entire application inside an enclave. Both approaches have their pros and cons. The SDK-based approach lets the -developers decide which components are to be or not to be put into the enclave. +developers decide which components are to be or not to be put into enclaves. Thus, it provides the flexibility and customizability that is attractive to advanced developers. However, this requires non-trivial efforts from the developers, especially when porting existing applications or libraries into @@ -44,12 +44,12 @@ is `memcpy`'ed from an untrusted component outside the enclave to a trusted program inside the enclave. The trusted program is under `trusted_memcpy_bench/`. Running upon Occlum, this -program is given an untrusted buffer outside the enclave and measures the I/O -throughput achieved by repeatedly `memcpy` from it. +program is given an untrusted buffer outside the enclave and measures the +memory throughput achieved by repeatedly `memcpy`ing. The untrusted component is under `bench_driver/`, which is a normal Linux program except that is linked with the Occlum PAL library and uses Occlum PAL -APIS to load and execute `trusted_memcpy_bench` program. The untrusted buffer +APIs to load and execute `trusted_memcpy_bench` program. The untrusted buffer required by `trusted_memcpy_bench` is prepared by `bench_driver`. ## How to Build and Run diff --git a/src/libos/src/entry.rs b/src/libos/src/entry.rs index 97affd2b..753aba36 100644 --- a/src/libos/src/entry.rs +++ b/src/libos/src/entry.rs @@ -22,7 +22,7 @@ pub extern "C" fn occlum_ecall_new_process( INIT_ONCE.call_once(|| { // Init the log infrastructure first so that log messages will be printed afterwards util::log::init(); - // Init OpenMP for SFI + // Init MPX for SFI util::mpx_util::mpx_enable(); // Register exception handlers (support cpuid & rdtsc for now) register_exception_handlers(); @@ -37,7 +37,6 @@ pub extern "C" fn occlum_ecall_new_process( return EXIT_STATUS_INTERNAL_ERROR; } }; - // register exception handlers (support cpuid & rdtsc for now) let _ = backtrace::enable_backtrace(ENCLAVE_PATH, PrintFormat::Short); panic::catch_unwind(|| { backtrace::__rust_begin_short_backtrace(|| match do_new_process(&path, &args) { diff --git a/src/libos/src/error/error.rs b/src/libos/src/error/error.rs index 3951882d..e3d62bd7 100644 --- a/src/libos/src/error/error.rs +++ b/src/libos/src/error/error.rs @@ -20,7 +20,7 @@ pub struct ErrorLocation { } impl Error { - pub fn embeded(inner: (Errno, &'static str), location: Option) -> Error { + pub fn embedded(inner: (Errno, &'static str), location: Option) -> Error { Error { inner: Error__::Embedded(inner), location: location, diff --git a/src/libos/src/error/mod.rs b/src/libos/src/error/mod.rs index c46c5903..14bc33ab 100644 --- a/src/libos/src/error/mod.rs +++ b/src/libos/src/error/mod.rs @@ -21,7 +21,7 @@ macro_rules! errno { let msg: &'static str = $error_msg; (errno, msg) }; - let error = Error::embeded(inner_error, Some(ErrorLocation::new(file!(), line!()))); + let error = Error::embedded(inner_error, Some(ErrorLocation::new(file!(), line!()))); error }}; ($error_expr: expr) => {{