Commit Graph

924 Commits

Author SHA1 Message Date
zongmin.gu
85f5bc7ccc Fix a potential memory issue in fpregs' free 2020-08-20 17:01:08 +08:00
Hui, Chunyang
89c292e2df Fix some dependency errors when running on CentOS 8 2020-08-19 10:40:04 +00:00
He Sun
33e840143a Add Dockerfile based on CentOS 8.1 2020-08-17 22:28:03 +08:00
duanbing
000cd88756 Get quote size dynamiclly 2020-08-17 01:30:24 +08:00
Tate, Hongliang Tian
3e3a1955af Bump version to 0.15.0 2020-08-15 19:19:53 +08:00
Hui, Chunyang
9435b1a196 Add RPM installer for Occlum and C/C++ toolchains 2020-08-15 19:12:40 +08:00
zongmin.gu
2ca5629b3d Save floating point registers in exception/interrupt flow 2020-08-15 19:12:40 +08:00
zongmin.gu
68c8cc100b Fix the syscall interface bug 2020-08-15 19:12:40 +08:00
He Sun
d3429e15b7 Add guide to configure the resource of Occlum 2020-08-15 19:12:40 +08:00
LI Qing
cd5cc0cb5c Update Java toolchains
1. Replace the OpenJDK with an unmodified OpenJDK from Alpine Linux
2. Add Alibaba Dragonwell as the default JDK for the Java demos
2020-08-15 19:12:39 +08:00
Hui, Chunyang
122a66289c Fix LA demo to align with occlum command 2020-08-15 19:12:39 +08:00
Hui, Chunyang
faf9c9d14e Add fish script execute permission since SEFS has more strict checking 2020-08-15 19:12:39 +08:00
Hui, Chunyang
7ac917aa1a Fix PAL library command arguments not follow convention 2020-08-15 19:12:39 +08:00
Hui, Chunyang
153a6fcd61 Fix embedded mode demo can't find libraries 2020-08-15 19:12:39 +08:00
Hui, Chunyang
66e5cefec2 Add "occlum new" command 2020-08-15 19:12:39 +08:00
Hui, Chunyang
0252f0949d Rename "occlum_context" to "occlum_instance" for demos 2020-08-15 19:12:39 +08:00
Hui, Chunyang
85501d8993 Improve implementation for occlum build
This commit mainly accomplish two things:
1. Use makefile to manage dependencies for `occlum build`, which can save lots of time
2. Take dirs `build`, `run` outside from `.occlum`. Remove env var "OCCLUM_INSTANCE_DIR"
2020-08-15 19:12:39 +08:00
LI Qing
3f6bcec1c5 Substitute ramFS with a temporary SEFS at "/tmp" 2020-08-15 19:12:39 +08:00
He Sun
b04aa2d7ea Fix the dequeuing order of items in a FutexBucket 2020-08-15 19:12:39 +08:00
LI Qing
6d39587c40 Add getcpu syscall 2020-08-15 19:12:39 +08:00
zongmin.gu
c67bdd9a23 Update the syscall interface 2020-08-11 17:35:03 +08:00
Zongmin
120d7334fd Add coc of Occlum project 2020-08-11 14:41:19 +08:00
Hui, Chunyang
259c485427 Use new build directory arch 2020-08-11 13:47:17 +08:00
Tate, Hongliang Tian
5e8f997d4d Make PIE the default mode for Go toolchain
Occlum-compatible executable binaries must be Position-Independent
Executable (PIE). Previously, to build such binaries, the users need to
explicitly give `-buildmode=pie` flag to `occlum-go`. Apparently, this
is error-prone. This commit sets `-buildmode=pie` by default for `occlum-go`.

In addition, this commit upgrades the Go version to 1.13.7.
2020-08-11 05:35:43 +00:00
Hui, Chunyang
bec8bf5e8b Migrate CI to Github Actions 2020-08-11 12:07:23 +08:00
Hui, Chunyang
32fa9fe4aa Fix cpuid test case to check SGX support accurately 2020-08-11 12:07:23 +08:00
He Sun
9b17ac1847 Improve futex performance
1. Enlarge the size of the futex buckets;
2. Wake up the waiting threads in one ocall.
2020-07-28 13:14:27 +08:00
He Sun
2400cc4baa Fix the signal action examination of SIGKILL and SIGSTOP
Sigaction() can be called with a NULL second argument to query the
current signal handler.
2020-07-28 12:20:34 +08:00
LI Qing
572873d9a4 Enable UnionFS 2020-07-23 21:40:34 +08:00
Tate, Hongliang Tian
55eaae8810 Bump version to 0.14.0 2020-07-18 06:36:59 +08:00
Hui, Chunyang
ebd7dc056b Add occlum specific EDL file to decouple with official linux-sgx-sdk psw
In this case, sefs-fuse can run with official linux-sgx-sdk psw.
2020-07-18 06:36:59 +08:00
Tate, Hongliang Tian
8c7b59ad17 Fix a bug in sigaction
The bug would allow the user to block non-blockable signals (SIGKILL and SIGSTOP)
using sigaction syscall. This commit fixes this bug.
2020-07-18 01:39:04 +08:00
LI Qing
1f30d75713 Add Java demo 2020-07-17 17:35:24 +00:00
LI Qing
81eb364c5b Install zlib in occlum-gcc toolchians 2020-07-17 17:31:41 +00:00
Tate, Hongliang Tian
a6dbce21cc Add msync system call and flush updates to shared file memory mappings
1. Add msync-related methods to VMManager;
2. Add msync system call;
3. Fix munmap, fsync, and fdatasync system calls;
4. Add test cases.
2020-07-17 16:57:00 +00:00
He Sun
c85163ec0a Add notification mechanism for basic IO events
1. Add notification mechanism for select, poll, epoll and blocking IO
2. Add pipe support for select, poll and blocking IO
2020-07-18 00:27:26 +08:00
Hui, Chunyang
9b1d694830 Add support for per-process memory size configuration with rlimit
Rlimit are now on the same page of memory space limits defined in Occlum.json. Specific
memory size configuration can be set to child process with `prlimit` syscall or using `ulimit`
command in shell script.
2020-07-17 22:07:56 +08:00
Hui, Chunyang
c43fbfea7f Fix signal testcase and a bug in sig_set 2020-07-17 18:02:09 +08:00
zongmin.gu
c7e225a4eb Fix the centos version
When user cat /etc/system-release, user would know the centos version. It should be 7.5
2020-07-17 16:39:02 +08:00
Hui, Chunyang
4f96790cf3 Fallback to old way for exit process in simulation mode 2020-07-16 21:35:47 +08:00
zongmin.gu
45b799d99f Stop the server within the given seconds.
If a new command comes when the timer is not triggered, stop the timer.
2020-07-16 20:12:12 +08:00
He Sun
3d70ca9355 Substitute SgxRwLock with RwLock 2020-07-16 14:35:38 +08:00
He Sun
4f965fd8db Apply RwLock to the sig_queues of Process and Thread
The new RwLock has better performance than SgxMutex and SgxRwLock.
2020-07-16 14:35:38 +08:00
He Sun
83637d7938 Add a new kind of readers-writer lock 2020-07-16 14:35:32 +08:00
Tate, Hongliang Tian
0db804d131 Support sa_mask for sigaction syscall
Struct sigaction has a field named sa_mask, which specifies the blocked
signals while executing the signal handler. Previously, this field is not
supported. This commit adds this missing feature.
2020-07-15 10:20:36 +08:00
He Sun
cfda47b316 Check the input buffer size against the available CPUs in sched_get/setaffinity
There are scenarios where the available CPUs are less than all the CPUs
on the machine. Therefore, sched_get/setaffinity should be allowed when
the input buffer size is no less than the available CPUs but less than
all the CPUs.
2020-07-15 09:58:23 +08:00
Hui, Chunyang
306c0333ad Fix occlum PAL library compatibility issues in demos 2020-07-14 11:22:11 +00:00
He Sun
b4750c0fcd Revert "Zeroize memory in munmap"
This reverts commit 1e456f025d6b4e34a726180e7a27a04424fe79d1.
This commit results in segmentation fault when the application munmaps
its own stack. Should be committed back after removing the dependency of
sysret on the user space stack.
2020-07-14 10:32:12 +08:00
Tate, Hongliang Tian
518ff76228 Bump version to 0.13.1 2020-07-11 14:19:41 +00:00
Tate, Hongliang Tian
a3ad465ce3 Fix SGX simulation mode broken by the interrupt subsystem
The new interrupt subsystem breaks the simulation mode in two ways:

1. The signal 64 is not handled by Intel SGX SDK in simulation mode. A
handled real-time signal crashes the process.

2. The newly-enabled test case exit_group depends on interrupts. But
enclave interrupts, like enclave exceptions, are not supported in
simulation mode.

This commit ensures signal 64 is ignored by default and exit_group test
case is not enabled in simulation mode.
2020-07-11 14:19:41 +00:00