Commit Graph

15 Commits

Author SHA1 Message Date
LI Qing
22b02850a3 Add Glibc as an optional libc and fix test cases 2020-12-16 19:21:22 +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
71df1cf2c8 Add the new poll implementation 2020-11-12 15:49:20 +08:00
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
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
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
5b695c9539 Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
He Sun
295d52fbe8 Add pipe support for fcntl's F_GETFL and F_SETFL commands 2020-01-23 04:40:54 +00:00
Tate, Hongliang Tian
dff0dbf77d Add the integrity-only mode SEFS
* Add patch to Rust SGX SDK to enable integrity-only SgxFile
* Upgrade to the new SEFS extended with the integrity-only mode
* Use integrity-only SEFS for /bin and /lib in test
* Add the MAC of integrity-only SEFS to Occlum.json in test
* Mount multiple FS according to Occlum.json
* Check the MACs of integrity-only SEFS images
2019-08-17 04:20:11 +00:00
Tate, Hongliang Tian
13974315ad Fix all compiler warnings for tests 2019-07-20 03:34:00 +00:00
WangRunji
0ec4ba9305 load program bin from SEFS 2019-03-29 14:20:25 +08:00
WangRunji
8f078e9499 fix bin path in tests 2019-03-29 14:20:25 +08:00
Tate, Hongliang Tian
71d119181e Support argc and argv for child process after spawn 2019-02-16 16:24:08 +08:00
Tate, Hongliang Tian
ad704c421f Add argc and argv support 2019-02-16 16:24:08 +08:00
Tate, Hongliang Tian
a712bfe70a Add pipe test 2019-02-16 16:24:08 +08:00