occlum/test
Tate, Hongliang Tian b585fce65d Add the interrupt subsystem
Before this commit, events like signals and exit_group are handled by
LibOS threads in a cooperative fashion: if the user code executed by a
LibOS thread does not invoke system calls (e.g., a busy loop), then the LibOS
won't have any opportunity to take control and handle events.

With the help from the POSIX signal-based interrupt mechanism of
Occlum's version of Intel SGX SDK, the LibOS can now interrupt the
execution of arbitrary user code in a LibOS thread by sending real-time
POSIX signals (the signal number is 64) to it. These signals are sent by
a helper thread spawn by Occlum PAL. The helper thread periodically
enters into the enclave to check if there are any LibOS threads with
pending events. If any, the helper thread broadcast POSIX signals to
them. When interrupted by a signal, the receiver LibOS thread may be in
one of the two previously problematic states in terms of event handling:

1. Executing non-cooperative user code (e.g., a busy loop). In this
case, the signal will trigger an interrupt handler inside the enclave,
which can then enter the LibOS kernel to deal with any pending events.

2. Executing an OCall that invokes blocking system calls (e.g., futex,
nanosleep, or blocking I/O). In this case, the signal will interrupt the
blocking system call so that the OCall can return back to the enclave.

Thanks to the new interrupt subsystem, some event-based system calls
are made robust. One such example is exit_group. We can now guarantee
that exit_group can force any thread in a process to exit.
2020-07-10 11:52:01 +00:00
..
access Fix the dirfd issue when path is absolute 2020-07-10 18:08:03 +08:00
chmod Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
chown Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
client Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
cout Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
cpuid Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
data_sink Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
device Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
empty Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
emulate_syscall Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
env Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
eventfd Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
exit_group Add the interrupt subsystem 2020-07-10 11:52:01 +00:00
fcntl Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
file Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
fs_perms Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
getpid Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
hello_world Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
hostfs Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
include Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
ioctl Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
link Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
malloc Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
mkdir Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
mmap Add mprotect system call 2020-06-19 07:32:31 +00:00
open Fix the dirfd issue when path is absolute 2020-07-10 18:08:03 +08:00
pipe Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
pipe_throughput Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
prctl Add prctl support of PR_SET/GET_NAME options 2020-07-10 08:31:54 +00:00
pthread Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
rdtsc Fix the emulation of RDTSC instruction with ocall 2020-03-24 22:06:14 +08:00
readdir Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
rlimit Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
sched Fix sched set/get affinity wrong behaviour 2020-06-02 17:36:36 +08:00
server Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
server_epoll Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
signal Support page fault 2020-06-04 20:36:29 +08:00
sleep Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
spawn Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
spawn_and_exit_latency Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
stat Fix the dirfd issue when path is absolute 2020-07-10 18:08:03 +08:00
symlink Add support to handle symbolic link file 2020-07-10 18:08:03 +08:00
sysinfo Add support for sysinfo syscall 2020-06-13 03:33:32 +00:00
time Add clock_getres syscall 2020-06-13 03:33:32 +00:00
tls Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
truncate Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
uname Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
unix_socket Add the unix socket support for sendto system call 2020-06-03 17:57:38 +08:00
unix_socket_throughput Format c/c++ files in src, tools and test 2020-05-27 07:09:18 +00:00
Makefile Add prctl support of PR_SET/GET_NAME options 2020-07-10 08:31:54 +00:00
Occlum.json Reorder the config entries in Occlum.json 2020-06-05 04:16:16 +00:00
test_common.mk Polish build and install process 2020-07-08 11:51:33 +00:00