Fix some typos
This commit is contained in:
parent
671da280d8
commit
c6bcbaf442
@ -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.
|
LibOS-based approach runs the entire application inside an enclave.
|
||||||
|
|
||||||
Both approaches have their pros and cons. The SDK-based approach lets the
|
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
|
Thus, it provides the flexibility and customizability that is attractive to
|
||||||
advanced developers. However, this requires non-trivial efforts from the
|
advanced developers. However, this requires non-trivial efforts from the
|
||||||
developers, especially when porting existing applications or libraries into
|
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.
|
program inside the enclave.
|
||||||
|
|
||||||
The trusted program is under `trusted_memcpy_bench/`. Running upon Occlum, this
|
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
|
program is given an untrusted buffer outside the enclave and measures the
|
||||||
throughput achieved by repeatedly `memcpy` from it.
|
memory throughput achieved by repeatedly `memcpy`ing.
|
||||||
|
|
||||||
The untrusted component is under `bench_driver/`, which is a normal Linux
|
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
|
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`.
|
required by `trusted_memcpy_bench` is prepared by `bench_driver`.
|
||||||
|
|
||||||
## How to Build and Run
|
## How to Build and Run
|
||||||
|
@ -22,7 +22,7 @@ pub extern "C" fn occlum_ecall_new_process(
|
|||||||
INIT_ONCE.call_once(|| {
|
INIT_ONCE.call_once(|| {
|
||||||
// Init the log infrastructure first so that log messages will be printed afterwards
|
// Init the log infrastructure first so that log messages will be printed afterwards
|
||||||
util::log::init();
|
util::log::init();
|
||||||
// Init OpenMP for SFI
|
// Init MPX for SFI
|
||||||
util::mpx_util::mpx_enable();
|
util::mpx_util::mpx_enable();
|
||||||
// Register exception handlers (support cpuid & rdtsc for now)
|
// Register exception handlers (support cpuid & rdtsc for now)
|
||||||
register_exception_handlers();
|
register_exception_handlers();
|
||||||
@ -37,7 +37,6 @@ pub extern "C" fn occlum_ecall_new_process(
|
|||||||
return EXIT_STATUS_INTERNAL_ERROR;
|
return EXIT_STATUS_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// register exception handlers (support cpuid & rdtsc for now)
|
|
||||||
let _ = backtrace::enable_backtrace(ENCLAVE_PATH, PrintFormat::Short);
|
let _ = backtrace::enable_backtrace(ENCLAVE_PATH, PrintFormat::Short);
|
||||||
panic::catch_unwind(|| {
|
panic::catch_unwind(|| {
|
||||||
backtrace::__rust_begin_short_backtrace(|| match do_new_process(&path, &args) {
|
backtrace::__rust_begin_short_backtrace(|| match do_new_process(&path, &args) {
|
||||||
|
@ -20,7 +20,7 @@ pub struct ErrorLocation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Error {
|
impl Error {
|
||||||
pub fn embeded(inner: (Errno, &'static str), location: Option<ErrorLocation>) -> Error {
|
pub fn embedded(inner: (Errno, &'static str), location: Option<ErrorLocation>) -> Error {
|
||||||
Error {
|
Error {
|
||||||
inner: Error__::Embedded(inner),
|
inner: Error__::Embedded(inner),
|
||||||
location: location,
|
location: location,
|
||||||
|
@ -21,7 +21,7 @@ macro_rules! errno {
|
|||||||
let msg: &'static str = $error_msg;
|
let msg: &'static str = $error_msg;
|
||||||
(errno, 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
|
||||||
}};
|
}};
|
||||||
($error_expr: expr) => {{
|
($error_expr: expr) => {{
|
||||||
|
Loading…
Reference in New Issue
Block a user