Enclave Memory Management via Lightweight Virtual Manager
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In trusted computing architectures, the operating system's virtual memory manager cannot perform swapping for memory allocated within memory enclaves, making it difficult to efficiently manage memory and maintain a small trusted computing base, especially in closed-source operating systems like Microsoft Windows and Apple iOS.
Innovation Solution
A trusted execution framework with its own lightweight virtual memory manager (VMM) is provided within the memory enclave, allowing for user-mode heap swapping and memory management, which includes allocating buffers, managing scope, and protecting memory from swapping to disk, while ensuring security through encryption and eviction of least recently used pages.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If the operating system's virtual memory manager is used for swapping, then memory management is simplified, but the trusted computing base becomes larger and security is compromised
Solution Approach 1:
The patent segments memory management into two distinct components: a lightweight VMM for enclave memory management and swapping, and the full OS kernel VMM for general system memory management. This segmentation allows the trusted computing base to remain small while still providing comprehensive memory management capabilities.
Solution Approach 2:
The patent introduces a lightweight virtual memory manager as an intermediary layer between the enclave memory and the swap file. This intermediary handles swapping operations for enclave memory without requiring the full OS kernel VMM to be included in the trusted computing base, thus maintaining security while enabling memory management.
2Reliability
If memory swapping is disabled for enclaves, then security is maintained, but memory availability and efficiency are reduced
Solution Approach 1:
The patent extracts the swapping functionality from the full OS kernel VMM and implements it as a separate lightweight VMM component. This extracted component can be selectively enabled for enclave memory without compromising the security of the main trusted computing base, thus enabling memory efficiency while maintaining security.
3Adaptability or versatility
If a full OS kernel VMM is included in the enclave, then comprehensive memory management is achieved, but the trusted computing base becomes unnecessarily large
Solution Approach 1:
The patent implements a dynamic memory management system where the lightweight VMM can adaptively manage enclave memory based on scope directives and usage patterns. This dynamic approach provides comprehensive memory management capabilities without requiring the static overhead of a full OS kernel VMM.
Solution Approach 2:
The patent uses a lightweight, disposable VMM implementation that can be easily created and destroyed for each enclave. This approach provides comprehensive memory management functionality without the permanent overhead of including a full OS kernel VMM in the trusted computing base.
Data Source
AI summary
In an example, there is disclosed a computing apparatus, including a processor, including a trusted execution instruction set; a memory having an enclave portion, wherein the enclave is accessible only via the trusted execution instruction set; a swap file; and a memory management engine operable to: allocate a buffer within the enclave; receive a scope directive to indicate that the buffer is in scope; and protect the buffer from swapping to the swap file while the buffer is in scope. There is further disclosed an method of providing a memory management engine, and one or more computer-readable storage mediums having stored thereon executable instructions for providing the memory management engine.


