Previously, PARALLELMFLAGS variable caused warnings during Glibc build:
"-jN forced in submake: disabling jobserver mode". Since make supports
the jobserver such that passing -jN to parent make automatically allows
its child make to parallelize its jobs, we do not have to pass -j flags
to the child make.
- Forward container's LD_LIBRARY_PATH to the generated manifest
- Handle special library names when generating trusted files (libxxx-xxx.so)
- Add more standard files/directories to the generated manifest
Previously, Graphene supported Glibc version 2.19 only. This commit
adds support for Glibc v2.23 (default in Ubuntu 16.04) and Glibc
v2.27 (default in Ubuntu 18.04). The exact version can be chosen by
specifying GLIBC_VERSION during Graphene build. The default version
to be built is v2.27.
Note that for the best GDB experience it is advised to build Graphene
with the same Glibc version as installed on the host OS.
vDSO is supported by Graphene now, so this commit removes the
modification of Glibc which disabled vDSO in Graphene. Currently,
compile-time option GLIBC_DISABLE_VDSO is introduced to be able
to revert to the old behaviour (disabled by default).
Do not declare the result of the recursive Make call as "phony" to avoid
unnecessary rebuilds. Due to the missing dependency information we of
course still need to always recurse.
Inside `struct shim_handle` `opened` reference counter is used incorrectly.
Additionally at this moment it guards the same resource (handle) as `ref_counter`,
making it obsolete. This patch removes `opened` counter and moves `close_handle`
logic into `put_handle`.
When signal is unmasked and its handler is SIG_IGN, this signal must not
be queued, otherwise such queued but unused signals result in memory leak.
Additionally, SIGCHLD signal can be discarded even if it is unmasked. For
reference, see Linux code (do_notify_parent() @ linux/kernel/signal.c).
Previous implementation had a few bugs in path-normalization functions,
e.g., in get_norm_path(): "../..a/" -> "....a" and "/../a" -> "../a",
and in get_base_name(): "/" -> garbage (buffer overflow).
Internal LibOS and PAL interfaces use microseconds (us) for timeout
values. However, Linux epoll_wait/epoll_pwait syscalls use milliseconds
(ms) for timeout. Previously, there was a bug in timeout resolution
because epoll_wait() emulation did not convert from ms to us. This
commit fixes this bug and also adds suffixes "_ms" and "_us" to make the
time units used explicit.
PAL loader cannot relocate executables. Thus, PIE executables (per
default GCC setting on Ubuntu 18.04) will crash if no other loader
(e.g., Glibc loader) is involved. Since PAL tests are only for
internal testing purposes, we simply make these tests position-
dependent (adding -no-pie to CFLAGS).
Previously, setup_pal_map() instructed GDB to load symbols for the PAL
shared library using incorrectly formatted string with "0x%p". This led
to addresses of the form "0x0xdeadbeef" which could not be parsed by
GDB. This commit fixes this via "%p" and thus enables SGX-GDB again.
If the path of allowed directory in a manifest file ended with a '/'
e.g. "sgx.allowed_files.tmp_dir = file:tmp/" anything inside it was
disallowed due to a buggy subdirectory check
Previously, relocation of vDSO symbols was not performed when vDSO
was mapped, leading to segfaults. The relocation of these symbols
is in fact not necessary, so this commit suppresses relocation by
using GOT entries with static symbols.