The new option specifies the file check policy, determining how and which files
can be opened. Previously, there were only two strict options: sgx.trusted_files
and sgx.allowed_files, but they are not flexible enough (e.g., unknown files are
never allowed).
This commit introduces two policies:
- allow_all_but_log allows files other than trusted/allowed files to be opened
but outputs a warning message. This is a convenient way to debug applications.
- strict disallows all files other than trusted/allowed files (just like the
previous logic).
This commit allows setting the AVX, AVX512, and MPX bits in SIGSTRUCT.xfrms
dynamically unless the features are specifically enabled in the manifest via
sgx.require_[avx|avx512|mpx]=1 options. If the bits are set in SIGSTRUCT.xfrms
but the CPU feature(s) are not available on the platform, the enclave
initialization (EINIT) should fail. In addition, the xfrms and xfrmmask fields
in the EINITTOKEN must match with SIGSTRUCT.
For detection of SGX/non-SGX (for example in regression tests) always
use the SGX environment variable. To generate launch/EINIT tokens use
the new 'sgx-tokens' Make target.
Before argv[0] was treated specially and was changed to a value
from manifest file. Now this happens only if binary was run as
a manifest i.e. `./pal_loader path_to_manifest_file`.