Introduction to Gramine¶
Gramine is a lightweight guest OS, designed to run a single Linux application with minimal host requirements. Gramine can run applications in an isolated environment with benefits comparable to running a complete OS in a virtual machine – including guest customization, ease of porting to different host OSes, and process migration.
Gramine supports running Linux applications using the Intel SGX (Software Guard Extensions) technology (we sometimes call this version Gramine-SGX). With Intel SGX, applications are secured in hardware-encrypted memory regions (called SGX enclaves). SGX protects code and data in the enclave against privileged software attacks and against physical attacks on the hardware off the CPU package (e.g., cold-boot attacks on RAM). Gramine is able to run unmodified applications inside SGX enclaves, without the toll of manually porting the application to the SGX environment.
This website contains the official documentation of Gramine. For external contributions and additional resources, please visit https://gramine-contrib.readthedocs.io. Note that this link contains unofficial documents; these documents are not guaranteed to always be up-to-date and correct.
For GSC (Gramine Shielded Containers) documentation please visit https://gramine.readthedocs.io/projects/gsc.
Building and running Gramine¶
See Quick start for instructions how to quickly install and run Gramine. For full build instructions, see Building. To deploy Gramine in the cloud, see Cloud Deployment.
Contacts and Contributing¶
For bug reports, post an issue on our GitHub repository: https://github.com/gramineproject/gramine/issues.
For any questions, please send an email to email@example.com (public archive).
If you want to contribute to the project, please see Contributing to Gramine and Onboarding. Thank you for your interest!
Table of Contents¶
- Quick start
- Manifest syntax
- Attestation and Secret Provisioning
- Performance tuning and analysis
- Enabling per-thread and process-wide SGX stats
- Effects of system calls / ocalls
- Exitless feature
- Optional CPU features (AVX, AVX512, MPX, PKRU, AMX)
- Multi-threaded workloads
- Multi-process workloads
- Choice of SGX machine
- Glibc malloc tuning
- Other considerations
- Profiling with
- SGX profiling
- Profiling SGX hotspots with Intel VTune Profiler
- Other useful tools for profiling
- Cloud Deployment
- Users of Gramine
- Container integration
- Introduction to SGX
- gramine-direct, gramine-sgx – Run something
- gramine-argv-serializer – Serialize command line arguments
- gramine-manifest – Gramine manifest preprocessor
- gramine-sgx-gen-private-key – Gramine SGX key generator
- gramine-sgx-get-token – Gramine SGX token generator
- gramine-sgx-ias-request – Submit Intel Attestation Service request
- gramine-sgx-ias-verify-report – Verify Intel Attestation Service report
- gramine-sgx-quote-view – Display SGX quote structure
- gramine-sgx-sign – Gramine SIGSTRUCT generator
- gramine-sgx-sigstruct-view – Display SGX SIGSTRUCT
- is-sgx-available – Check environment for SGX compatibility
- PAL host ABI
- PAL as loader
- Data types and variables
- PAL APIs