This repository was archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 258
RFC: Trusted files metadata sideloading #2685
Copy link
Copy link
Open
Description
Description of the problem
The current manifest building and loading process consumes amount of time and memory resources for some workloads which has many direct and indirect dependencies including dynamic libraries, configuration files and data files. the original design of it may become one of bottleneck for complex workloads along with larger EPC available to use, the current design shown in Fig.1
Fig.1 Original manifest processing
There are several potential problems
- The generated
...manifest.sgxfile replicates the...manifest.templateand...manifestfiles - The size of generated
...manifest.sgxfile is significantly larger than the...manifest.templateand...manifestfiles - The key of trusted files in
...manfest.sgxoccupied a lot of space - The generated
...manifest.sgxfile hardly is human readable due to those inserted associative checksums with trusted files - The
...sigsignature file don't bind to user configured...manifest.templatefile - The
...manifest.templatewill confuse end users, because conventionally, it is a template for user configured file not configuration file itself. - The Pal load needs to consume highly indeterministic initial EPC memory resource to load & parse the manifest itself as mentioned in issue Workloads (Redis, Curl, R) failing with Out of memory PAL error after new manifest syntax to define lists of SGX trusted files. #2680
- There are some placeholders where building tool needs to fill it up that is not fully deterministic.
The proposed solution shown in Fig. 2

Fig.2 Proposed manifest processing
The solution addressed those problems in question.
- Move
...manifest.templatefile out of building process, the end user should provide...manifestfile instead of template file to reduce replication and avoid confusion, a assistant tool may help end user to configure it. ...manifest.sgxfile contains checksum for trusted files only to reduce replication, the signature file takes care of both...manifest.sgxand...manifestfiles- In
...manifest.sgxfile, it removes the key of file and its checksum, instead, it is a serialized blob file that contains a array of tuple of file and its checksum as[(file, checksum)...]to largely reduce the size of it to load into initial EPC memory space - Obsolete the Pal runtime parsing process for
...manifest.sgxfile as it already got parsed and saved as a blob in building process. it will reduce the loading time while saving EPC space. - Reduce the complexity of manifest processing
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
