Commit Graph

388 Commits

Author SHA1 Message Date
Hui, Chunyang
f4d9a7f4e1 Fix travis test script 2020-06-05 14:51:12 +08:00
Tate, Hongliang Tian
37ca75da47 Update README to explain the new Occlum.json format 2020-06-05 04:16:16 +00:00
Tate, Hongliang Tian
ffbae880f2 Reorder the config entries in Occlum.json
Not all config entries are created equal: some are more likely to be
customized by users, some are not so often. This commit reorders the
config entries in descending order of expected popularity.
2020-06-05 04:16:16 +00:00
LI Qing
c1b4814703 Rewrite Python demo with NumPy, scikit-learn, and pandas 2020-06-05 11:56:31 +08:00
zongmin.gu
942321363d Combine the enclave configuration into the occlum configuration file
Update the occlum.json to align with the gen_enclave_conf design.
Below is the two updated structures:
   "metadata": {
        "product_id": 0,
        "version_number": 0,
        "debuggable": true
    },
    "resource_limits": {
        "max_num_of_threads": 32,
        "kernel_space_heap_size": "32MB",
        "kernel_space_stack_size": "1MB",
        "user_space_size": "256MB"
    }
2020-06-05 11:03:47 +08:00
Tate, Hongliang Tian
c87ce9dd34 Bump version to 0.12.2 2020-06-04 21:39:56 +00:00
LI Qing
f54abc78a2 Support to execute a symlink file 2020-06-04 20:46:50 +08:00
Tate, Hongliang Tian
655869711a Support page fault 2020-06-04 20:36:29 +08:00
Hui, Chunyang
3939899e76 Fix local attestation demo to use new PAL API and sdk 2.9.1
Also format the code.
2020-06-04 20:05:55 +08:00
Tate, Hongliang Tian
8c113eb8a2 Fix a minor format issue 2020-06-04 11:47:48 +00:00
Tianjia Zhang
aed88145f2 pal: Fix crash caused by getpwuid() returning NULL
On lightweight Linux distribution, like alpine, getpwuid()
returns NULL, and errno is ENOENT, this patch fix crash
caused by this situation.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
2020-06-04 19:36:15 +08:00
Tianjia Zhang
e8c48161b5 pal: Fix typo error in saving token file
The address of the `token` should be used by fwrite().

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
2020-06-04 19:33:57 +08:00
He Sun
eb4bb860ce Add the unix socket support for sendto system call 2020-06-03 17:57:38 +08:00
He Sun
987e06a458 Move networking system call interfaces to net module 2020-06-03 17:57:38 +08:00
Hui, Chunyang
ed664d1143 Fix sched set/get affinity wrong behaviour
1. Fix child process not inherit affinity from parent process
2. Add warning for buffer length gap with kernel when getaffinity
2020-06-02 17:36:36 +08:00
YiLin.Li
e59ba66ccf Update RunE Quick Start doc
1. Update CentOS dockerimage to 7.5
2. Allow users to define OCCLUM_INSTANCE_DIR
2020-06-02 17:01:27 +08:00
Tate, Hongliang Tian
db4ed1ba80 Bump version to 0.12.1 2020-06-02 16:47:20 +08:00
LI Qing
9b611e5f00 Update musl to v1.1.24 2020-06-02 05:39:29 +00:00
Hui, Chunyang
0a6b782769 Enable format check for travis CI 2020-06-01 10:26:40 +00:00
Hui, Chunyang
73b4f8b08c Add support for PAL API v2 2020-05-29 05:26:38 +00:00
LI Qing
e6996f3c45 Add mremap system call 2020-05-29 03:38:49 +00:00
LI Qing
c27a94194f Polish the Golang demo with Gin web framework 2020-05-29 02:03:41 +00:00
Hui, Chunyang
c1911e6585 Add demo for shell (FISH) script 2020-05-28 19:55:09 +08:00
Hui, Chunyang
5b695c9539 Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
Hui, Chunyang
03ba13aec7 Add "make format" and "make format-check" to check format for c/c++ files 2020-05-27 07:08:59 +00:00
He Sun
cd2f13ae54 Refactor select syscall
1. Substitute the underlying poll OCall to select OCall to update the
timeout argument correctly.
2. Add more checks for the inputs.
2020-05-26 11:44:46 +08:00
Hui, Chunyang
c14ee62678 Add untrusted environment variable override
Add "untrusted" sections for environment variables defined in Occlum.json. Environment
variable defined in "default" will be shown in libos directly. Environment variable
defined in "untrusted" can be passed from occlum run or PAL layer and can override
the value in "default" and thus is considered "untrusted".
2020-05-25 03:14:54 +00:00
Tate, Hongliang Tian
acc3eb019f Add two figures to README.md 2020-05-22 16:57:01 +08:00
He Sun
b29aa1d6d0 Add the Occlum-compatible Rust toolchains and a demo 2020-05-22 14:36:11 +08:00
Hui, Chunyang
bc6002f6dd Add counters for passes and failures in test
Also exit with error if the fail number is not 0.
2020-05-22 14:23:20 +08:00
Hui, Chunyang
dadffb9f17 Fix sendfile syscall write buffer length 2020-05-21 17:20:12 +08:00
Hui, Chunyang
c6e0e06768 Clean up the build files generated in src/exec 2020-05-21 08:54:42 +00:00
LI Qing
f193f271a4 Update docker file for CentOS 2020-05-21 02:14:00 +00:00
Zongmin
17b4912055 Send SIGCHLD to parent process 2020-05-18 20:24:14 +08:00
He Sun
459ca45ab9 Fix reading extra message in neogotiate_msg 2020-05-15 21:49:26 +08:00
Tate, Hongliang Tian
e1789dc89f Bump version to 0.12.0
Also, update the docs accordingly.
2020-05-15 11:32:44 +00:00
Tate, Hongliang Tian
d91014b417 Add RunE Quick Start doc 2020-05-15 11:32:44 +00:00
He Sun
a0b34c4450 Remove unintentionally added comments 2020-05-15 11:32:14 +00:00
He Sun
9252a1a993 Fix two bugs of ioctl
1. Add length of the argument to the ioctl ocall to guard sgx sdk to do
the copy.
2. Handle non-zero return value of ioctl.
2020-05-15 12:50:31 +08:00
LI Qing
6d72e10fc1 Add Golang toolchain and the demo
This commit provides a modified Go runtime in Docker image.
Now we can build a Go program using `occlum-go`, then run it
in SGX enclaves by Occlum.
The Golang demo demonstrates how to build and run a web server
program written in Go.
2020-05-15 03:02:42 +00:00
Zongmin
0c3466f4ad Add three new occlum commands: start, exec and stop
Usage:
//start the occlum server
occlum start

//execute the command inside occlum
occlum exec [cmd] [-- <args>]

//stop the occlum server
occlum stop
2020-05-15 03:02:42 +00:00
LI Qing
4567b40f22 Fix a bug of zipping symlink files in rcore-fs-fuse 2020-05-15 03:02:42 +00:00
LI Qing
2d34ee349e Add the sigaltstack system call 2020-05-15 03:02:42 +00:00
Hui, Chunyang
255f277f30 Build Occlum tools in SGX simulation mode by default 2020-05-15 03:02:42 +00:00
Hui, Chunyang
0bb1cbfbb5 Add PAL version api 2020-05-15 03:02:42 +00:00
He Sun
f9486bf7a9 Add resource limit check for the number of the fds in poll 2020-05-15 03:02:42 +00:00
zongmin.gu
eca27408be Support user manage stack
Go/Java/JIT code manage their own stack
So we need to help them to handle exception
2020-05-15 03:02:42 +00:00
He Sun
aed572064b Fix potential address-in-use errors in epoll_server test
Wait for all the children to exit before server exits to release all the
resource used by the test.
2020-05-15 03:02:42 +00:00
Zongmin
a6d97d5b4f 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
2020-05-15 03:02:42 +00:00
Tate, Hongliang Tian
1d1330772c Add new API occlum_pal_kill
This API enables sending signals to one or multiple LibOS processes from
outside the enclave.
2020-05-15 03:02:42 +00:00