Commit Graph

851 Commits

Author SHA1 Message Date
Tate, Hongliang Tian
6fdfa57a14 Add the new epoll implementation
Before this commit, the epoll implementation works by simply delegating to the
host OS through OCall. One major problem with this implementation is
that it can only handle files that are backed by a file of the host OS
(e.g., sockets), but not those are are mainly implemented by the LibOS
(e.g., pipes). Therefore, a new epoll implementation that can handle all
kinds of files is needed.

This commit completely rewrites the epoll implementation by leveraging
the new event subsystem. Now the new epoll can handle all file types:

1. Host files, e.g., sockets, eventfd;
2. LibOS files, e.g., pipes;
3. Hybrid files, e.g., epoll files.

For a new file type to support epoll, it only neends to implement no
more than four methods of the File trait:

* poll (required for all file types);
* notifier (required for all file files);
* host_fd (only required for host files);
* recv_host_events (only required for host files).
2020-11-10 14:34:40 +08:00
Tate, Hongliang Tian
2ff4b1c776 Reduce the FileRef type to Arc<dyn File>
The FileRef type was defined as Arc<Box<dyn File>>, where the use of Box is
unnecessary. This commit reduces the type to Arc<dyn File>.
2020-11-10 14:34:40 +08:00
LI Qing
6e83595b74 Fix the return value of getcwd syscall 2020-11-09 19:45:21 +08:00
LI Qing
f87bbc586b Fix the alignment of stack entrypoint
Libc ABI requires 16-byte alignment of the stack entrypoint
2020-11-09 19:43:00 +08:00
LI Qing
1882458862 Mitigate SEFS's consistency and atomic issues 2020-11-07 11:45:37 +08:00
Shirong Hao
9d059ad057 Update the path of rune binary to /usr/local/bin/rune 2020-11-06 08:39:55 +08:00
He Sun
9dd94cdbd6 Fix the conflict of symbols with glibc 2020-11-05 21:57:48 +08:00
He Sun
0bb8f5922e Use sccache to accelerate Rust build 2020-11-05 21:54:57 +08:00
jeffery.wsj
fe2a5629ba Add Dragonwell11 for enclave build and install README.md 2020-11-02 12:36:15 +08:00
Shirong Hao
fc0bb79de8 Update runE Quick Start doc
1. Running Occlum application with docker and rune instead of Occlum application bundle
2. Update to occlum-0.17.0 and rune-0.5.0
3. Using Occlum installer instead of Occlum sdk image to build Occlum application
2020-10-29 22:25:34 +08:00
Hui, Chunyang
12ace2600c Add package deployment and test action 2020-10-29 14:03:59 +08:00
zongmin.gu
a5c2e553b7 Bump version to 0.17.0 2020-10-22 19:53:20 +08:00
Hui, Chunyang
8d1e1838d3 Fix package build errors
1. Fix repeatedly linking dynamic libraries for occlum-run
2. Fix gcc toolchain deb package build error
3. Remove redundant file from installer file list
4. Change symlink target path to relative path
2020-10-22 16:47:47 +08:00
He Sun
4f02e71160 Only copy the received data to user space in recvmsg
Redundant copy may result in dirty data.
2020-10-22 15:51:07 +08:00
He Sun
dd63f0194f Refine the data comparison in server_epoll test
Verify received data with the length of the data sent from client.
Otherwise, it may fail when there was dirty data in the buffer for
receiving.
2020-10-22 15:51:07 +08:00
Hui, Chunyang
66bd826b6b Fix softlinks in sdk_libs to point to customized sgxsdk libraries 2020-10-21 17:51:22 +08:00
superajun-wsj
bef3201aef Update demos/font/font_support_for_java/README.md
OK

Co-authored-by: Zongmin.Gu <59240482+guzongmin@users.noreply.github.com>
2020-10-21 17:41:49 +08:00
jeffery.wsj
7eb132c2b2 Support occlum font for java 2020-10-21 17:41:49 +08:00
LI Qing
28f47dacce Add ioctl support for FIONBIO command 2020-10-21 12:51:18 +08:00
He Sun
d590486029 Refactor host socket
1. Add Rust memory-safe types, e.g., socket_address, address_family and socket_type;
2. Implement Berkeley Sockets API for HostSocket.
2020-10-21 12:24:00 +08:00
LI Qing
230e6fa380 Report the underlying SGX protected file I/O error 2020-10-21 12:20:52 +08:00
He Sun
9a47791ae3 Put the shebang in the front of run_occlum_bench.sh 2020-10-21 10:38:11 +08:00
Hui, Chunyang
3b5a84a129 Add libos symbolic link of hardware mode for installation 2020-10-19 13:12:18 +08:00
yuanwu
66b64f8276 Update the xgboost to latest version
Intel has optimized the xgboost in latest version. Performance has
obvious acceleration in benchmark. In svm training with Yahoo LTR data,
latest version gets 7.8X acceleration in host, and 2X acceleration in occlum.

Signed-off-by: yuanwu <yuan.wu@intel.com>
2020-10-18 09:59:06 +08:00
James Dong
4048686c3b Add Golang SQLite test for CI 2020-10-15 10:07:11 +08:00
Hui, Chunyang
e82b3dab92 Integrate cargo fmt into make format 2020-10-14 20:34:12 +08:00
Hui, Chunyang
8fbd6295bf Add Golang installer 2020-10-14 13:17:58 +08:00
Hui, Chunyang
f4e1352b41 Add Python demo CI 2020-10-13 16:06:02 +08:00
yuanwu
cd588d2ca4 Add the gRPC-golang benchmark
Copied and Modified the google.golang.org/grpc/benchmark/run_bench.sh to
support the benchmark with occlum.

Signed-off-by: yuanwu <yuan.wu@intel.com>
2020-10-12 11:24:33 +08:00
Hui, Chunyang
4269395f1d Remove python from Occlum commands 2020-10-10 14:59:42 +08:00
Hui, Chunyang
b97f903bf9 Get rid of occlum-gen-default-occlum-json script
Integrate it with previous gen_enclave_conf and rename to gen_internal_conf which
are now used generate both internal Occlum.json and Enclave.xml
2020-10-10 14:59:42 +08:00
yuanwu
69820c0d8c Add the SQLite benchmark app
Add the SQLite speedtest for performance benchmark

Signed-off-by: yuanwu <yuan.wu@intel.com>
2020-10-10 14:24:29 +08:00
James Dong
7fb4d9039a Fix an issue caused by recent reverted interface-based service registration
in cmd/protoc-gen-go-grpc.
2020-10-10 14:14:14 +08:00
Tate, Hongliang Tian
f5ae00895e Refactor pipe with the new event subsystem
1. Introduce channels, which provide an efficient means for IPC;
2. Leverage channels to rewrite pipe, improving the performance (3X),
robustness, and readability.

This pipe rewrite is not done: some more commits will be added to
implement poll and epoll for pipe.
2020-10-09 16:37:11 +08:00
Tate, Hongliang Tian
f39a31cda0 Fix a bug in HostEventFd 2020-10-09 16:37:11 +08:00
Tate, Hongliang Tian
567e965eae Add sigtimedwait syscall 2020-09-29 18:10:30 +08:00
Tate, Hongliang Tian
9bb1baef4e Add the event subsystem
An event can be anything ranging from the exit of a process (interesting
to `wait4`) to the arrival of a blocked signal (interesting to
`sigwaitinfo`), from the completion of a file operation (interesting to
`epoll`) to the change of a file status (interesting to `inotify`).

To meet the event-related demands from various subsystems, this event
subsystem is designed to provide a set of general-purpose primitives:

* `Waiter`, `Waker`, and `WaiterQueue` are primitives to put threads
to sleep and later wake them up.
* `Event`, `Observer`, and `Notifier` are primitives to handle and
broadcast events.
* `WaiterQueueObserver` implements the common pattern of waking up
threads once some interesting events happen.
2020-09-29 18:08:10 +08:00
Hui, Chunyang
1f6fc3d27a Fix copy softlink for make install and deb installer 2020-09-29 18:06:04 +08:00
Hui, Chunyang
ce147df2c9 Enable TFLite and OpenVINO test for CI and add CI image build action 2020-09-29 16:51:38 +08:00
James Dong
fec361f664 Add Golang SQLite demo 2020-09-27 14:21:58 +08:00
He Sun
c39b6f1dc2 Eliminate compiler warnings 2020-09-27 14:17:01 +08:00
LI Qing
280d0a885c Add prerequisite part of the doc for "occlum mount" 2020-09-25 16:55:12 +08:00
LI Qing
5e1635e2b8 Change the calling interface with sefs-cli 2020-09-25 16:34:07 +08:00
Hui, Chunyang
5960b2c787 Add demo test for CI 2020-09-21 20:45:13 +08:00
Hui, Chunyang
f4b3389bbe Fix golang grpc and local attestation demo to align with occlum 0.16.0 2020-09-20 10:39:54 +08:00
Tate, Hongliang Tian
5df923057a Revise the root README 2020-09-18 15:40:04 +08:00
Tate, Hongliang Tian
01dee44322 Bump version to 0.16.0 2020-09-18 15:40:04 +08:00
zongmin.gu
b28aee68b7 Upgrade Intel SGX SDK to 2.11 and Rust SGX SDK accordingly 2020-09-18 15:39:58 +08:00
Hui, Chunyang
4031216f13 Add timerslack concept for libos and enbale prctl PR_GET_TIMERSLACK option 2020-09-18 12:39:12 +08:00
LI Qing
1a11655169 Fix two bugs related to open directories
1. Support O_DIRECTORY flag for open syscall
2. Disallow to open a directory in write mode
2020-09-18 12:39:12 +08:00