diff --git a/demos/bash/occlum_bash_test.sh b/demos/bash/occlum_bash_test.sh index a35a3188..3d5a8f41 100755 --- a/demos/bash/occlum_bash_test.sh +++ b/demos/bash/occlum_bash_test.sh @@ -15,7 +15,7 @@ busybox echo $DATE TEST=$(busybox echo $(busybox date)) busybox echo $TEST -# Test command subsitution and pipe +# Test command substitution and pipe busybox echo $(busybox echo -e "Hello-world-from-bash\n test" | busybox awk '$1=$1' FS="-" OFS=" ") # Test multiple redirection @@ -62,7 +62,7 @@ cd /host pwd cd - -# Test ulimit defined below will overide configuration in Occlum.json +# Test ulimit defined below will override configuration in Occlum.json ulimit -Ss 10240 # stack size 10M ulimit -Sd 40960 # heap size 40M ulimit -Sv 122880 # virtual memory size 120M (including heap, stack, mmap size) diff --git a/demos/benchmarks/sysbench/dl_and_build.sh b/demos/benchmarks/sysbench/dl_and_build.sh index 53160117..3d1dab38 100755 --- a/demos/benchmarks/sysbench/dl_and_build.sh +++ b/demos/benchmarks/sysbench/dl_and_build.sh @@ -4,7 +4,7 @@ set -e SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) TAG=1.0.20 -SYSBENCH_ISNTALL_DIR=${SCRIPT_DIR}/sysbench-install +SYSBENCH_INSTALL_DIR=${SCRIPT_DIR}/sysbench-install rm -rf sysbench-* $TAG.tar.gz* wget https://github.com/akopytov/sysbench/archive/refs/tags/$TAG.tar.gz @@ -12,7 +12,7 @@ tar zxvf $TAG.tar.gz pushd sysbench-$TAG ./autogen.sh -./configure --without-mysql --prefix=${SYSBENCH_ISNTALL_DIR} +./configure --without-mysql --prefix=${SYSBENCH_INSTALL_DIR} make -j make install popd diff --git a/demos/deployment/README.md b/demos/deployment/README.md index bfeed9ce..6b25f80e 100644 --- a/demos/deployment/README.md +++ b/demos/deployment/README.md @@ -1,12 +1,12 @@ # Docker Image for Deployment -For deployment purpose, we would like to see the image as small as possible. However, Occlum has a variaty of dependencies which is not friendly if users want to deploy the application. +For deployment purpose, we would like to see the image as small as possible. However, Occlum has a variety of dependencies which is not friendly if users want to deploy the application. With the help of [docker multistage build](https://docs.docker.com/develop/develop-images/multistage-build/) and `occlum package` command, we provide dockerfile templates to build a image with the smallest size for deployment environment. Checkout the dockerfile templates for [Ubuntu](./Dockerfile_template.ubuntu18.04) and [CentOS](./Dockerfile_template.centos8.2). There are three stages in each dockerfile: - - base stage: This stage configures the package management systems of specific OS and intall required packages for deployment, including `occlum-runtime` and sgx-psw packages. If users want to install specific version of packages, modification should be done in this stage. + - base stage: This stage configures the package management systems of specific OS and install required packages for deployment, including `occlum-runtime` and sgx-psw packages. If users want to install specific version of packages, modification should be done in this stage. - packager stage: This stage is to build and package the application for deployment. User should also finish the enclave signing in this stage.Users can build your own applications and put to occlum instance. And then use "occlum build" and "occlum package" commands to get a minimum subset of files to run in deployment environment. To support full Occlum commands, extra dependencies are installed. diff --git a/demos/enclave_tls/README.md b/demos/enclave_tls/README.md index 3a2d5505..817ab0b3 100644 --- a/demos/enclave_tls/README.md +++ b/demos/enclave_tls/README.md @@ -8,7 +8,7 @@ Step 1: Download and build Enclave TLS. ``` When completed, the resulting server can be found at `/opt/enclave-tls/bin`. -Step 2: You can run the encalve tls server on Occlum. +Step 2: You can run the enclave tls server on Occlum. ```shell ./run_enclave_tls_server_in_occlum.sh ``` diff --git a/demos/fish/README.md b/demos/fish/README.md index fa4f53c2..29e0b7eb 100644 --- a/demos/fish/README.md +++ b/demos/fish/README.md @@ -31,7 +31,7 @@ As demonstrated here, Occlum supports executing any script file that begins with at its first line by invoking the interpreter program specified with the shebang. ### Step 1: -Downlaod FISH and busybox and build them with Occlum tool chain: +Download FISH and busybox and build them with Occlum tool chain: ``` ./download_and_build.sh ``` diff --git a/demos/fish/test_per_process_config.sh b/demos/fish/test_per_process_config.sh index dffa4789..bca5f628 100755 --- a/demos/fish/test_per_process_config.sh +++ b/demos/fish/test_per_process_config.sh @@ -1,7 +1,7 @@ #! /usr/bin/fish ulimit -a -# ulimit defined below will overide configuration in Occlum.json +# ulimit defined below will override configuration in Occlum.json ulimit -Sv 122880 # virtual memory size 120M (including heap, stack, mmap size) ulimit -Ss 10240 # stack size 10M ulimit -Sd 40960 # heap size 40M diff --git a/demos/grpc/grpc_musl/README.md b/demos/grpc/grpc_musl/README.md index 9b374f70..3239cad3 100644 --- a/demos/grpc/grpc_musl/README.md +++ b/demos/grpc/grpc_musl/README.md @@ -1,7 +1,7 @@ # Run gRPC C++ Client/Server on Occlum ## Step 1: -Downlaod, build and install openssl into `/usr/local/occlum/x86_64-linux-musl/lib`: +Download, build and install openssl into `/usr/local/occlum/x86_64-linux-musl/lib`: ``` ./download_and_install_openssl.sh ``` diff --git a/demos/grpc/grpc_tls/README.md b/demos/grpc/grpc_tls/README.md index 41768c60..c9e14035 100644 --- a/demos/grpc/grpc_tls/README.md +++ b/demos/grpc/grpc_tls/README.md @@ -1,7 +1,7 @@ # Run gRPC TLS C++ Client/Server on Occlum ## Step 1: -Downlaod, build and install openssl into `/usr/local/occlum/x86_64-linux-musl/lib`: +Download, build and install openssl into `/usr/local/occlum/x86_64-linux-musl/lib`: ``` ./download_and_install_openssl.sh ``` diff --git a/demos/grpc/grpc_tls/greeter_secure_server.cc b/demos/grpc/grpc_tls/greeter_secure_server.cc index e4bd4ff7..1cede54d 100644 --- a/demos/grpc/grpc_tls/greeter_secure_server.cc +++ b/demos/grpc/grpc_tls/greeter_secure_server.cc @@ -53,7 +53,7 @@ void runServer() { /** - * [!] Be carefull here using one cert with the CN != localhost. [!] + * [!] Be carefully here using one cert with the CN != localhost. [!] **/ std::string server_address ( "localhost:50051" ); diff --git a/demos/local_attestation/AppInitiator/UntrustedEnclaveMessageExchange.cpp b/demos/local_attestation/AppInitiator/UntrustedEnclaveMessageExchange.cpp index 7d2460e8..b97a7276 100644 --- a/demos/local_attestation/AppInitiator/UntrustedEnclaveMessageExchange.cpp +++ b/demos/local_attestation/AppInitiator/UntrustedEnclaveMessageExchange.cpp @@ -121,7 +121,7 @@ ATTESTATION_STATUS exchange_report_ocall(sgx_dh_msg2_t *dh_msg2, sgx_dh_msg3_t * * [input] session_id: this is session id allocated by responder enclave * [input] req_message: this is pointer to request message * [input] req_message_size: this is request message size - * [input] max_payload_size: this is maxium payload size in response message + * [input] max_payload_size: this is maximum payload size in response message * [input, output] this is pointer to response message, the buffer is allocated by initiator enclave and filled by responder enclave * [input] response message size * */ diff --git a/demos/local_attestation/AppInitiator/UntrustedEnclaveMessageExchange.h b/demos/local_attestation/AppInitiator/UntrustedEnclaveMessageExchange.h index 9d846a13..a1035cc8 100644 --- a/demos/local_attestation/AppInitiator/UntrustedEnclaveMessageExchange.h +++ b/demos/local_attestation/AppInitiator/UntrustedEnclaveMessageExchange.h @@ -48,7 +48,7 @@ extern "C" { /* Function Description: This is OCALL interface for initiator enclave to get ECDH message 1 and session id from responder enclave * Parameter Description: - * [input, output] dh_msg1: pointer to ecdh msg1 buffer, this buffer is alloated in initiator enclave and filled by reponser enclave + * [input, output] dh_msg1: pointer to ecdh msg1 buffer, this buffer is allocated in initiator enclave and filled by reponser enclave * [output] session_id: pointer to session id which is allocated by responder enclave * */ uint32_t session_request_ocall(sgx_dh_msg1_t* dh_msg1, uint32_t* session_id); @@ -66,7 +66,7 @@ uint32_t exchange_report_ocall(sgx_dh_msg2_t* dh_msg2, sgx_dh_msg3_t* dh_msg3, u * [input] session_id: this is session id allocated by responder enclave * [input] req_message: this is pointer to request message * [input] req_message_size: this is request message size - * [input] max_payload_size: this is maxium payload size in response message + * [input] max_payload_size: this is maximum payload size in response message * [input, output] this is pointer to response message, the buffer is allocated by initiator enclave and filled by responder enclave * [input] response message size * */ diff --git a/demos/local_attestation/AppInitiator/app.cpp b/demos/local_attestation/AppInitiator/app.cpp index 91e960e9..85d3172e 100644 --- a/demos/local_attestation/AppInitiator/app.cpp +++ b/demos/local_attestation/AppInitiator/app.cpp @@ -95,7 +95,7 @@ int main(int argc, char *argv[]) { return -1; } - printf("Local attestation Sucess!\n"); + printf("Local attestation Success!\n"); return 0; } diff --git a/demos/local_attestation/AppInitiator/fifo.cpp b/demos/local_attestation/AppInitiator/fifo.cpp index dadc676f..ff3df1d8 100644 --- a/demos/local_attestation/AppInitiator/fifo.cpp +++ b/demos/local_attestation/AppInitiator/fifo.cpp @@ -51,7 +51,7 @@ * Parameter Description: * [input] fiforequest: this is pointer to request message * [input] fiforequest_size: this is request message size - * [output] fiforesponse: this is pointer fo response message, the buffer is allocated inside this function + * [output] fiforesponse: this is pointer for response message, the buffer is allocated inside this function * [output] fiforesponse_size: this is response message size * */ int client_send_receive(FIFO_MSG *fiforequest, size_t fiforequest_size, FIFO_MSG **fiforesponse, size_t *fiforesponse_size) { diff --git a/demos/local_attestation/AppResponder/session.c b/demos/local_attestation/AppResponder/session.c index 58add9dc..1eba5b24 100644 --- a/demos/local_attestation/AppResponder/session.c +++ b/demos/local_attestation/AppResponder/session.c @@ -64,7 +64,7 @@ int session_request(sgx_dh_msg1_t *dh_msg1, } memcpy(&g_dest_session_info_map[*session_id].in_progress.dh_session, &sgx_dh_session, sizeof(sgx_dh_session_t)); - //Store the session information under the correspoding source enlave id key + //Store the session information under the corresponding source enlave id key g_dest_session_info_map[*session_id].status = IN_PROGRESS; return SUCCESS; @@ -84,7 +84,7 @@ int exchange_report(sgx_dh_msg2_t *dh_msg2, memset(&dh_aek, 0, sizeof(sgx_key_128bit_t)); do { - //Retreive the session information for the corresponding source enclave id + //Retrieve the session information for the corresponding source enclave id session_info = &g_dest_session_info_map[session_id]; memcpy(&sgx_dh_session, &session_info->in_progress.dh_session, sizeof(sgx_dh_session_t)); diff --git a/demos/local_attestation/DiffieHellmanLibrary/DiffieHellmanLibrary.patch b/demos/local_attestation/DiffieHellmanLibrary/DiffieHellmanLibrary.patch index ebabffe2..e235b041 100644 --- a/demos/local_attestation/DiffieHellmanLibrary/DiffieHellmanLibrary.patch +++ b/demos/local_attestation/DiffieHellmanLibrary/DiffieHellmanLibrary.patch @@ -84,7 +84,7 @@ index 40c1539..dd8ab9e 100644 #endif +typedef struct { -+ const sgx_target_info_t* target_info; // input (optinal) ++ const sgx_target_info_t* target_info; // input (optional) + const sgx_report_data_t* report_data; // input (optional) + sgx_report_t* report; // output +} sgxioc_create_report_arg_t; diff --git a/demos/local_attestation/EnclaveInitiator/EnclaveInitiator.cpp b/demos/local_attestation/EnclaveInitiator/EnclaveInitiator.cpp index 55b37c10..babcd2cc 100644 --- a/demos/local_attestation/EnclaveInitiator/EnclaveInitiator.cpp +++ b/demos/local_attestation/EnclaveInitiator/EnclaveInitiator.cpp @@ -122,7 +122,7 @@ uint32_t test_close_session() * For demonstration purpose, we verify below points: * 1. peer enclave's MRSIGNER is as expected * 2. peer enclave's PROD_ID is as expected - * 3. peer enclave's attribute is reasonable: it's INITIALIZED'ed enclave; in non-debug build configuraiton, the enlave isn't loaded with enclave debug mode. + * 3. peer enclave's attribute is reasonable: it's INITIALIZED'ed enclave; in non-debug build configuration, the enlave isn't loaded with enclave debug mode. **/ extern "C" uint32_t verify_peer_enclave_trust(sgx_dh_session_enclave_identity_t* peer_enclave_identity) { @@ -141,7 +141,7 @@ extern "C" uint32_t verify_peer_enclave_trust(sgx_dh_session_enclave_identity_t* return SUCCESS; } -/* Function Desciption: Operates on the input secret and generate the output secret +/* Function Description: Operates on the input secret and generate the output secret * */ uint32_t get_message_exchange_response(uint32_t inp_secret_data) { diff --git a/demos/local_attestation/EnclaveInitiator/EnclaveMessageExchange.cpp b/demos/local_attestation/EnclaveInitiator/EnclaveMessageExchange.cpp index 2e828ff2..a5896e69 100644 --- a/demos/local_attestation/EnclaveInitiator/EnclaveMessageExchange.cpp +++ b/demos/local_attestation/EnclaveInitiator/EnclaveMessageExchange.cpp @@ -87,7 +87,7 @@ ATTESTATION_STATUS create_session(dh_session_t *session_info) memset(&dh_msg3, 0, sizeof(sgx_dh_msg3_t)); memset(session_info, 0, sizeof(dh_session_t)); - //Intialize the session as a session initiator + //Initialize the session as a session initiator status = sgx_dh_init_session(SGX_DH_SESSION_INITIATOR, &sgx_dh_session); if(SGX_SUCCESS != status) { @@ -105,7 +105,7 @@ ATTESTATION_STATUS create_session(dh_session_t *session_info) { return ATTESTATION_SE_ERROR; } - //Process the message 1 obtained from desination enclave and generate message 2 + //Process the message 1 obtained from destination enclave and generate message 2 status = sgx_dh_initiator_proc_msg1(&dh_msg1, &dh_msg2, &sgx_dh_session); if(SGX_SUCCESS != status) { diff --git a/demos/local_attestation/download_src_and_build_deps.sh b/demos/local_attestation/download_src_and_build_deps.sh index ad5d497c..1e9d930b 100755 --- a/demos/local_attestation/download_src_and_build_deps.sh +++ b/demos/local_attestation/download_src_and_build_deps.sh @@ -37,7 +37,7 @@ if [ ! -f "$TARGET_SO" ] ; then make -j${nproc} && make install && \ echo "Build openssl successfully" || exit 1 else - echo "The openssl library is aleady existent" + echo "The openssl library is already existent" fi # Download SGX SDK diff --git a/demos/openvino/0001-Fix-passing-pre-increment-parameter-cpu-to-CPU_ISSET.patch b/demos/openvino/0001-Fix-passing-pre-increment-parameter-cpu-to-CPU_ISSET.patch index 1333d568..8f7673c0 100644 --- a/demos/openvino/0001-Fix-passing-pre-increment-parameter-cpu-to-CPU_ISSET.patch +++ b/demos/openvino/0001-Fix-passing-pre-increment-parameter-cpu-to-CPU_ISSET.patch @@ -8,7 +8,7 @@ that the CPU_ISSET_S macro defined in musl libc is not quite robust: it expands the first argument more than once (Glibc's counterpart does not have this issue). So if the first argument has any side effect, then the macro will have unexpected consequences. Unfortunately, this is exactly -what happens in the orignal code of OpenVINO. +what happens in the original code of OpenVINO. --- inference-engine/src/mkldnn_plugin/mkldnn_streams.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/demos/python/flask/gen-cert.sh b/demos/python/flask/gen-cert.sh index 1bafb9c1..efc40e7a 100755 --- a/demos/python/flask/gen-cert.sh +++ b/demos/python/flask/gen-cert.sh @@ -4,7 +4,7 @@ pushd ~ openssl rand -writerand .rnd popd -# Geneate self-signed key/cert +# Generate self-signed key/cert # Generate valid Flask server Key/Cert openssl genrsa -out flask.key 2048 openssl req -nodes -new -key flask.key -subj "/CN=localhost" -out flask.csr diff --git a/demos/pytorch/distributed/README.md b/demos/pytorch/distributed/README.md index 7d4abb96..e74c6723 100644 --- a/demos/pytorch/distributed/README.md +++ b/demos/pytorch/distributed/README.md @@ -51,7 +51,7 @@ This tutorial is written under the assumption that you have Docker installed and Occlum is compatible with glibc-supported Python, we employ miniconda as python installation tool. You can import PyTorch packages using conda. Here, miniconda is automatically installed by install_python_with_conda.sh script, the required python and PyTorch packages for this project are also loaded by this script. Here, we take occlum/occlum:0.29.3-ubuntu20.04 as example. -In the following example, we will try to run a distributed PyTorch training using `fasion-MNIST` dataset with 2 processes (Occlum instance). +In the following example, we will try to run a distributed PyTorch training using `fashion-MNIST` dataset with 2 processes (Occlum instance). Thus, we set `WORLD_SIZE` to 2.