Commit Graph

421 Commits

Author SHA1 Message Date
Hui, Chunyang
d0331bd397 Add detection for FSGSBASE enablement in PAL 2021-03-11 14:51:52 +08:00
zongmin.gu
17fcaf85e1 Bump version to 0.21.0 2021-03-03 16:07:51 +08:00
zongmin.gu
9fc81fcc87 Update exec mode to handle uRTS crash case 2021-03-03 16:07:51 +08:00
zongmin.gu
0252f98d60 Enable exception test cases under simulation mode 2021-03-03 16:07:51 +08:00
LI Qing
be62e2c65d Add posix_fallocate 2021-03-03 11:06:09 +08:00
LI Qing
3dbf050904 Add sync_all, sync_data and poll for hostfs file 2021-03-02 13:47:02 +08:00
zongmin.gu
7122529b6b Fix affinity array size incorrect issue 2021-03-02 13:45:07 +08:00
LI Qing
7deeccb03b Fix the error of demos with encrypted fs image 2021-03-02 13:25:36 +08:00
LI Qing
c3a02ffc28 Add support for the encrypted fs image 2021-03-01 16:45:01 +08:00
Hui, Chunyang
a2959c17df Reduce redundant mprotect ocall 2021-02-24 14:46:41 +08:00
Hui, Chunyang
79b264a6c8 Add support for Address Space Layout Randomization
ASLR is only enabled on release mode. Also manage the whole process
VM with VMManager.
2021-02-24 14:46:41 +08:00
LI Qing
d7b994bc7d Fix getdents cannot output all entries in a directory 2021-02-24 13:24:54 +08:00
Hui, Chunyang
c4c3315c06 Fix false alarm on non-page-aligned size for mprotect 2021-02-23 20:59:17 +08:00
Hui, Chunyang
1fab79681b Use goblin as elf parser and only load segments on demand
Libos now Only read in headers and needed segments. Also reduce a memory
copy.
2021-02-04 15:02:28 +08:00
zongmin.gu
fdde009e5d Bump Occlum version to 0.20.0 2021-01-22 17:36:53 +08:00
He Sun
1788f94bfe Fix the poll of channel according to gvisor pipe poll test 2021-01-22 13:22:02 +08:00
He Sun
2ea7fc1ad6 Add Unix socket support for poll
A relay notifier that observes the underlying endpoint is added as the
notifier for the socket. It broadcasts to its observers when either end
of the channel has IoEvents.
2021-01-21 23:45:36 +08:00
He Sun
0b829ca087 Fix the return IoEvents of channel poll 2021-01-21 23:45:36 +08:00
He Sun
3101d8fa88 Resolve the nested block of Unix socket
Read, write, connect and accept have both blocking and nonblocking mode.
It may block after the status lock is acquired resulting in potential
deadlock. This commit resolve the deadlock issue.
2021-01-21 23:45:36 +08:00
He Sun
1101bdf9e7 Fix multiplication overflow 2021-01-21 18:18:57 +08:00
LI Qing
0b51d83811 Add ProcFS 2021-01-20 12:42:00 +08:00
LI Qing
8bfef4086f Polish the function names in FS 2021-01-20 12:42:00 +08:00
LI Qing
d6cd89f03b Add DevFS for device files 2021-01-20 11:40:39 +08:00
He Sun
b5ea09066a Add support for libos code coverage
1. Add OCCLUM_COV to conditionally enable gcov profiling for libos Rust
code;
2. Add a makefile target to locally generate the coverage report in html
format.
2021-01-19 15:30:26 +08:00
zongmin.gu
e304c9fa23 Bump version to 0.19.1 2021-01-13 11:09:16 +08:00
LI Qing
6416692a16 Fix the wrong definition of StructuredIoctlArgType 2021-01-08 15:38:37 +08:00
He Sun
7c4c5dd7e5 Fix wrong SIGPIPE number 2021-01-07 12:45:38 +08:00
zongmin.gu
3cb3165f8b Bump Occlum version to 0.19.0 2020-12-19 19:53:31 +08:00
LI Qing
e1c9739577 Remove the flags argument handling in fchmodat syscall
The flags argument of fchmodat syscall is handled by the wrapper
function in libc already, so Occlum does not need to accept this argument.
2020-12-19 19:53:31 +08:00
He Sun
f1e5f574ca Add support for DCAP
1. Five new ioctl commands of /dev/sgx are added for occlum
applications to securely get and verify DCAP quote;
2. Not all the functions of the intel DCAP package are open to
developers to simplify the DCAP usage;
3. The test may only run on the platform with DCAP driver installed;
4. A macro OCCLUM_DISABLE_DCAP is used to separate the DCAP code from
the other code.
5. Skip DCAP test when DCAP driver is not detected or in simulation mode
2020-12-19 19:53:31 +08:00
LI Qing
a53562adea Add support to mount FS at any existing directories 2020-12-17 15:55:40 +08:00
zongmin.gu
ce174e1496 Fix the UDS path too long issue 2020-12-16 23:28:24 +08:00
LI Qing
1a00884e1c Optimize the loading process of the ELF file
1. Load ld.so according to the executable automatically
2. Add the position-independent check for ELF file
2020-12-16 19:21:22 +08:00
LI Qing
318f1e6a4f Add posix_spawn support for Glibc 2020-12-16 19:21:22 +08:00
LI Qing
40a52b56be Initialize a randon number on stack for the stack protector 2020-12-16 19:21:22 +08:00
He Sun
3b915db774 Refactor Unix socket
1. Implement type-safe functions;
2. Improve the correctness of nearly all the functions;
3. Improve the readability by introducing Listener and Endpoint for StreamUnix;
4. Substitue RingBuf with Channel in Unix socket.
2020-12-16 01:28:53 +08:00
zongmin.gu
1f1502c7d5 Bump to 0.18.1 2020-12-03 10:57:22 +08:00
zongmin.gu
f699ff3efd Fix Occlum memory leak issue
The enable_backtrace function should only be used in the init function.
2020-12-02 15:08:50 +08:00
zongmin.gu
b5e3558f5f Enable EPC usage measurement feature 2020-12-02 15:08:50 +08:00
Tate, Hongliang Tian
9809d81c4e Fix a bug of channels
This bugfix ensures that when an object of Producer/Consumer for
channels is dropped, its shutdown method is called automatically. This ensures
that the peer of a Producer/Consumer gets notified and won't wait indefinitely.
2020-12-02 14:51:26 +08:00
Hui, Chunyang
0a810b9b58 Add return error code for ecall 2020-12-02 13:29:41 +08:00
zongmin.gu
928cfecf9d Change Tcmalloc as optional feature
The current Tcmalloc has memory leak issue. So change it as optional. By
default, dlmalloc is used. Enable tcmalloc with below command:
make TCMALLOC=Y
2020-11-23 21:26:41 +08:00
zongmin.gu
3163a62963 Bump version to 0.18.0 2020-11-20 09:24:24 +08:00
LI Qing
4769a2600e Add FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET options for futex syscall 2020-11-20 09:24:24 +08:00
Tate, Hongliang Tian
34288a5e37 Use HostFd to manage the lifetime of host OS resources 2020-11-19 08:13:57 +08:00
Tate, Hongliang Tian
83ce318f6c Unregister a file from epoll files when the file is closed
Usually, files are unregistered from an epoll file via the EPOLL_CTL_DEL command
explicitly. But for the sake of users' convenience, Linux supports
unregistering a file automatically from the epoll files that monitor the file
when the file is closed. This commit adds this capability.
2020-11-18 22:17:23 +08:00
Tate, Hongliang Tian
1de089ac7d Rewrite the select syscall using the new poll implementation 2020-11-18 19:35:04 +08:00
Tate, Hongliang Tian
a857cf9bfb Fix a design flaw in handling events of host files 2020-11-18 19:35:04 +08:00
Tate, Hongliang Tian
798cbfd843 Fix pushing/popping zero-length slices to/from Channel 2020-11-18 19:35:04 +08:00
Tate, Hongliang Tian
10f3ffa9e6 Fix Channel's notifier being inconsistent with poll/epoll 2020-11-18 19:35:04 +08:00