Enclave Data Migration via Control Thread
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In cloud computing scenarios, the migration of CPU enclaves between different physical hosts results in inconsistent running status data due to the inability of operating systems or virtual machine monitors to access and migrate data stored in the Enclave Page Cache (EPC), as only enclave codes are allowed to access this data.
Innovation Solution
A migration control thread within the enclave is used to access and write running status data into target memory accessible by the operating system, ensuring the data can be migrated while maintaining confidentiality and integrity, and the destination host restores the enclave and data using a corresponding migration control thread.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If operating system or virtual machine monitor accesses and migrates data in EPC, then data migration capability is improved, but enclave security and data confidentiality are compromised
Solution Approach 1:
The patent introduces a migration control thread as an intermediary component that operates within the enclave to facilitate data migration. This thread acts as a mediator between the enclave's protected data and the external migration process, allowing data to be transferred without compromising the enclave's security model. The migration control thread reads data from EPC and writes it to target memory under controlled conditions, enabling migration while maintaining security boundaries.
Solution Approach 2:
The patent segments the data migration process into distinct phases: synchronization phase (where working threads are paused and migration control thread takes over), data copying phase (where migration control thread copies data from EPC to target memory), and restoration phase (where enclave is restored on target host). This segmentation allows secure data extraction without requiring continuous access to EPC, thereby maintaining security while enabling migration.
2Stability of the object's composition
If data is copied from EPC to target memory during migration, then running status data consistency is improved, but data confidentiality and integrity during migration are compromised
Solution Approach 1:
The patent applies preliminary action by synchronizing the enclave state before data copying. The migration control thread first pauses all working threads and ensures they are in a stopped state, then performs integrity verification and obtains authentication codes before copying data. This preliminary preparation ensures that the data being copied is in a consistent state and can be securely transferred without compromising confidentiality or integrity during the migration process.
3Productivity
If working threads continue execution during data migration, then system productivity is improved, but data consistency between source and target is compromised
Solution Approach 1:
The patent implements periodic action through a synchronized pause-resume mechanism. Working threads are periodically paused at synchronization points to allow data migration to occur, then resumed after migration completes. This periodic interruption ensures data consistency while minimizing impact on overall system productivity, as the pause is brief and occurs only during migration operations rather than continuous execution.
Data Source
Figure 1~2
Figure 3
Figure 4
AI summary
The present invention relates to the field of communications technologies, and in particular, to a data migration method and apparatus, to implement data migration in an EPC, to improve consistency between data of an application program before migration and that after migration. The method includes: obtaining, by a source host, a migration instruction, where the migration instruction is used to instruct to migrate a target application created with an enclave to a destination host; invoking, by the source host, a migration control thread preset in the enclave of the target application, to write running status data of the target application in an EPC into target memory of the source host, where the target memory is an area other than the EPC in memory of the source host; and sending, by the source host, the running status data of the target application in the target memory to the destination host.