Commit Graph
2 Commits
Author SHA1 Message Date
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