Enclave State Cloning for Arbitrary Pause-and-Resume Migration

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing techniques for migrating and/or cloning applications with enclaves cannot pause execution at an arbitrary point and continue from that point, leading to issues like restarting from the beginning instead of continuing from an intermediate value.

Innovation Solution

A method involving a migrator thread that saves the state of a source enclave to external memory using its own stack memory, without modifying the source enclave's heap or process stack memories, and an initiator thread that clones this state to a destination enclave using its own stack memory, ensuring the destination enclave resumes from the paused state.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If the application executes continuously without pausing, then the execution flow is simple and fast, but the application cannot be migrated or cloned at an arbitrary point

Engineering Contradiction:
Improvecapability to pause and resume at arbitrary pointsVSAvoidcomplexity of state saving and restoration mechanism
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The application state is segmented into distinct components: thread context area, process stack memories, and heap memory. Each component can be independently saved and restored, enabling flexible pausing and resumption at arbitrary points without requiring the entire application state to be copied.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A migrator thread is introduced as an intermediary component that facilitates state saving and restoration. The migrator thread manages the complex tasks of serializing state data, handling encryption/decryption operations, and coordinating the migration process between source and destination enclaves.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If the migrator thread uses source heap memory or source process stack memory for encryption operations, then memory usage is simplified, but the source enclave state is corrupted

Engineering Contradiction:
Improveintegrity of source enclave stateVSAvoidmemory allocation complexity for migrator thread
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The migrator thread's stack memory is extracted from the source enclave's memory spaces (heap and process stacks) and allocated as a separate, dedicated memory region. This extraction prevents the migrator thread from corrupting the source enclave state while providing it with the necessary memory for encryption operations.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

Different memory regions within the enclave are assigned different qualities: the source heap memory and process stack memories remain read-only for state preservation, while the migrator stack memory provides write-access for encryption operations. This local differentiation ensures data integrity while enabling necessary operations.

Inventive Principle:
Principle #3Local quality

3Measurement precision

If the migrator thread saves complete enclave state including migrator stack memory, then the state restoration is complete, but the migrated enclave has incorrect state due to encryption artifacts

Engineering Contradiction:
Improveaccuracy of state restorationVSAvoidencryption artifacts in saved state
Core Design Contradiction:
Measurement precisionVSLoss of information

Solution Approach 1:

The migrator stack memory is extracted from the saved enclave state, ensuring that encryption artifacts and temporary data used during migration do not become part of the persisted state. This extraction guarantees that only the actual application state (thread context, process stacks, and heap memory) is saved for restoration.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS12632538B2Enclave cloning
Publication Date: 2026.05.19 MICROSOFT TECHNOLOGY LICENSING LLC
  • US12632538B2 patent drawing
  • US12632538B2 patent drawing
  • US12632538B2 patent drawing

AI summary

A source enclave of a source application includes: at least one process thread; a respective at least one process stack memory; a heap memory; and a thread context area. An interrupt is sent to the source enclave which causes the process thread to exit. A migrator thread is sent to the source enclave to save to an external memory, using a migrator stack memory, the thread context area, the at least one process stack memory, and the heap memory, but not the migrator stack memory. A destination enclave is instantiated at a destination application. An initiator thread is sent to the destination enclave to clone, using an initiator stack memory, the state of the source enclave from the external memory.