4 Commits
Author SHA1 Message Date
Michał Kowalczyk ad477ec7bf Reformat repository to our C formatting rules (final iteration) 2020-09-15 02:00:54 +02:00
borysp 50ca6c4a22 [LibOS] Deliver signal to only one thread
Previously Graphene delivered each signal to all threads instead of
one. This was additionally abused to quit the application. Now each
signal is delivered to only one arbitrary thread. This commit
additionally cleans the signal and exiting code.
2020-06-08 18:21:11 +02:00
borysp a6b50967a6 [LibOS] Add a missing check for stack guard page when removing VMAs 2020-05-02 16:22:47 +02:00
Dmitrii Kuvaiskii e14bf7950f [LibOS] Allow Graphene-SGX to occupy the same process on execve()
The execve() syscall starts a new executable in the *same* process. Previously,
Graphene followed this convention *only* for non-SGX PALs. If PAL was Linux-SGX,
Graphene silently terminated the process and created a new one.

This deviation from standard execve() behavior resulted in the host shell
becoming detached from the Graphene-SGX process. In turn, this led to our
Bash example (on Ubuntu 18.04, bash version 4.4.19) "terminating" early
from the point of view of Jenkins, and SGX-18.04 pipeline failed.

This commit allows Graphene-SGX to execve() in the same process, but only if it
is the same executable (as in the Bash example). It is still impossible to
execve() in the same process for a different executable since this requires a
new SGX enclave measurement and thus demands a new process.
2019-11-29 15:18:56 -08:00