Memory Deduplication Copy-on-Write Protection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Memory deduplication techniques face challenges in maintaining performance consistency and preventing information leakage between applications, as the timing of write operations can reveal whether a memory page is deduplicated, leading to potential data exposure.
Innovation Solution
Implementing a method where a memory manager sets an initial memory page to write protection mode, detects attempted writes, creates a copy, and determines whether to discard the initial or copy page to maintain performance consistency and protect against deduplication exposure.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If memory deduplication is implemented by merging duplicate pages, then memory utilization is improved, but write operation timing becomes detectable leading to information leakage
Solution Approach 1:
The system performs preliminary actions by setting write protection on deduplicated pages before any write operations occur. When a write is attempted, the system has already prepared the copy-on-write mechanism, ensuring that the original deduplicated page is protected from direct modification. This preliminary setup prevents information leakage by ensuring that write timing characteristics do not reveal deduplication status.
Solution Approach 2:
The system creates a copy of the memory page when a write operation is attempted on a deduplicated page. This copying mechanism ensures that the original deduplicated page remains intact while allowing the writing application to modify its private copy. The copy operation happens in a controlled manner that masks timing characteristics, preventing other applications from detecting whether the page was deduplicated through write timing analysis.
2Loss of information
If write protection is applied to deduplicated memory pages, then information leakage is prevented, but write operation performance may be impacted
Solution Approach 1:
The system extracts the write protection constraint from the normal write path by implementing copy-on-write. When write protection is encountered, instead of blocking the write operation, the system extracts the page content into a new private copy and updates the mapping. This allows write operations to proceed without performance penalty while maintaining the security benefit of write protection on deduplicated pages.
Solution Approach 2:
The system changes the state parameter of the memory page from shared read-only to private writable through the copy-on-write mechanism. This parameter change is transparent to the writing application, which experiences no performance degradation. The physical write operation remains efficient while the logical write protection prevents information leakage by ensuring deduplicated pages cannot be directly modified.
3Quantity of substance
If duplicate memory pages are merged into a single page, then memory space is optimized, but detection of deduplication becomes possible through write timing
Solution Approach 1:
The system introduces an intermediary layer (the memory management unit and copy-on-write mechanism) between the writing application and the deduplicated page. This intermediary masks the true nature of the page by intercepting write attempts and handling them through controlled copying. The timing characteristics of write operations are normalized and made indistinguishable from writes to non-deduplicated pages, preventing detection while maintaining memory space optimization.
Solution Approach 2:
The system applies different quality characteristics to different aspects of the memory page: the deduplication status is maintained at the physical page level for space optimization, while the write access characteristics are made uniform at the application level through copy-on-write. This local differentiation ensures that deduplication cannot be detected through write timing while preserving memory space benefits.
Data Source
AI summary
An example method of providing deduplication support for one or more memory pages includes setting, by a memory manager, an initial memory page to a write protection mode. The initial memory page is located in an address space allocated to a memory consumer. The method also includes detecting, by the memory manager, an attempted write to the initial memory page. The method further includes creating, by the memory manager, a copy of the initial memory page in response to detecting the attempted write. The method also includes discarding, based on a determination of whether to discard the initial memory page or the copy of the initial memory page, the initial memory page or the copy of the initial memory page to provide protection for memory deduplication.


