A Secure and Persistent Memory System for Non-volatile Memory

Pengfei Zuo, Yu Hua, Yuan XiearXiv 2019 · OpenReview

Abstract

In non-volatile memory (NVM), ensuring the security and correctness of persistent data is fundamental. However, security and persistence issues are usually studied independently in existing work. To achieve both data security and persistence, simply combining existing persistence schemes with memory encryption is inefficient due to crash inconsistency and significant performance degradation. To bridge the gap between security and persistence, this paper proposes SecPM, a Secure and Persistent Memory system, which consists of a counter cache write-through (CWT) scheme and a locality-aware counter write reduction (CWR) scheme. Specifically, SecPM leverages the CWT scheme to guarantee the crash consistency via ensuring both the data and its counter are durable before the data flush completes, and leverages the CWR scheme to improve the system performance via exploiting the spatial locality of counter storage, log and data writes. We have implemented SecPM in gem5 with NVMain and evaluated it using five widely-used workloads. Extensive experimental results demonstrate that SecPM reduces up to half of write requests and speeds up the transaction execution by 1.3-2.0 times via using the CWR scheme, and achieves the performance close to an un-encrypted persistent memory system for large transactions.

Introduction

Non-volatile Memory (NVM) technologies like Phase Change Memory (PCM) and Intel’s Optane are poised to replace DRAM because they are fast, byte-addressable, and retain data even when power is lost. However, this "persistence" introduces a significant security risk: because data remains on the DIMM after power-off, it is vulnerable to physical theft. While standard Counter Mode encryption (AES-CTR) is used to protect NVM, it creates a "Persistence Gap."

Counter-mode encryption allows for parallelizing memory access and decryption to reduce latency.

In Counter Mode, decryption requires a unique "counter." If a system crashes after encrypted data is persisted but before its corresponding counter is written to NVM, the data becomes unrecoverable. Furthermore, the overhead of doubling every write (one for data, one for the counter) creates a massive performance bottleneck.

SecPM Architecture

SecPM (Secure and Persistent Memory) is a hardware-level architecture integrated into the memory controller that ensures crash consistency and high performance without requiring changes to software or compilers.

The SecPM architecture within the memory controller, featuring a Counter Cache and a Write Queue for managing data and counter persistence.

Counter Cache Write-Through (CWT)

To solve the consistency problem, SecPM implements the CWT scheme. When a CPU flushes a data line, the memory controller immediately fetches the associated counter and appends it to the write queue. By using a hardware register to hold the data-counter pair, SecPM ensures they are treated as an atomic unit. This guarantees that if the encrypted data reaches the NVM, its corresponding counter is durable as well.

Locality-aware Counter Write Reduction (CWR)

The performance bottleneck in secure NVM is often the metadata traffic (the counters) rather than the encryption math itself. SecPM’s CWR scheme exploits the fact that counters are stored densely: one 64-byte counter line holds counters for 64 different data lines. CWR scans the write queue; if multiple data writes in the queue share the same counter line, it merges those updates into a single NVM write, drastically reducing total write traffic.

Evaluation and Results

The researchers evaluated SecPM using the gem5 architectural simulator integrated with NVMain across five common data structure workloads: Array, Queue, B-tree, Hash Table, and RB-tree.

Key findings include:

  • Write Reduction: SecPM reduces NVM write requests by up to 50% compared to a baseline secure system.
  • Speedup: Transaction execution speed improved by 1.3x to 2.0x.
  • Scalability: In multi-core simulations, SecPM improved concurrent transaction throughput by an average of 64% to 95% across 1, 2, 4, and 8-core configurations.
  • Efficiency: For larger transactions (e.g., 4KB), SecPM achieves performance nearly identical to an unencrypted persistent memory system.

Conclusion

SecPM successfully bridges the gap between NVM security and persistence. By leveraging hardware-level schemes like CWT and CWR, it ensures crash consistency and significantly mitigates the performance overhead of memory encryption. Its transparency to software makes it a practical solution for next-generation secure, high-performance persistent memory systems.

Summary updated

BibTeX
@misc{zuo2019secure,
  author = {Pengfei Zuo and Yu Hua and Yuan Xie},
  title = {{A Secure and Persistent Memory System for Non-volatile Memory}},
  year = {2019},
  eprint = {1901.00620},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1901.00620},
}
Figure