Persist Level Parallelism: Streamlining Integrity Tree Updates for Secure Persistent Memory

Persist Level Parallelism: Streamlining Integrity Tree Updates for Secure Persistent Memory

Persist Level Parallelism: Streamlining Integrity Tree Updates for Secure Persistent Memory Alexander Freij∗, Shougang Yuany, Huiyang Zhouz Yan Solihin Dept. of Electrical & Computer Engineering Dept. of Computer Science North Carolina State University University of Central Florida ∗[email protected], [email protected], [email protected] [email protected] Abstract—Emerging non-volatile main memory (NVMM) is checkpointing frequency [1], [14], [23], [24], [48]. Finally, rapidly being integrated into computer systems. However, some applications have emerged that need to run on secure NVMM is vulnerable to potential data remanence and replay enclave and yet require persistency and crash recovery, such attacks. Memory encryption and integrity verification have been introduced to protect against such data integrity attacks. How- as a shadow file system [19]. ever, they are not compatible with a growing use of NVMM for Crash recovery of data with NVMM is achieved through providing crash recoverable persistent memory. Recent works on defining and using memory persistency models. However, secure NVMM pointed out the need for data and its metadata, there has not been a systematic study examining how secure including the counter, the message authentication code (MAC), NVMM can support crash recovery on persistency models. and the Bonsai Merkle Tree (BMT) to be persisted atomically. However, memory persistency models have been overlooked for Supporting persistency models on secure NVMM incurs two secure NVMM, which is essential for crash recoverability. new requirements: 1 the correct plaintext value of data must In this work, we analyze the invariants that need to be be recovered, and 2 data recovery must not trigger integrity ensured in order to support crash recovery for secure NVMM. verification failure for a given persistency model. To meet We highlight that by not adhering to these invariants, prior these requirements, the central question is what items must research has substantially under-estimated the cost of BMT persistence. We propose several optimization techniques to reduce persist together, and what persist ordering constraints are the overhead of atomically persisting updates to BMTs. The there to guarantee the above requirements? No prior studies optimizations proposed explore the use of pipelining, out-of-order have provided a complete answer. Liu et al. pointed out updates, and update coalescing while conforming to strict or that counters, data, and message authentication codes (MACs) epoch persistency models, respectively. We evaluate our work must persist atomically [33], but ignored the Merkle Tree for and show that our proposed optimizations significantly reduce the performance overhead of secure crash-recoverable NVMM integrity verification. Awad et al. pointed out that Merkle Tree from 720% to just 20%. must also be persisted leaf-to-root [4], but did not specify Index Terms—persistency, security, integrity tree update, ordering needed for persistency models. persist-level parallelism The focus of this work is to comprehensively analyze the persist and persist ordering requirements required for correct I. INTRODUCTION crash recovery on secure NVMM. Getting this analysis right Non-volatile main memory (NVMM) is coming online, of- is important. Not only does it affect correctness (i.e., whether fering non-volatility, good scaling potential, high density, low the above crash recovery requirements are met), but it also idle power, and byte addressability. A recent NVMM example affects the accurate performance overheads estimation and is Intel Optane DC Persistent Memory, providing a capacity of the derivation of possible performance optimizations. For 3TB per socket [22]. Due to non-volatility, data may remain example, one property missed by prior work is that leaf- in main memory for a very long time even without power, to-root updates of Bonsai Merkle trees (BMT) must follow exposing data to potential attackers [8]. Consequently, NVMM persist order, otherwise crash recovery may trigger integrity requires memory encryption and integrity protection to match verification failure at system recovery. Obeying this ordering the security of DRAM (which we refer to as secure NVMM), constraint, we found that the overheads of crash recoverable or to provide secure enclave environment. Furthermore, it is strict persistency (SP) is about 30× slowdown, which is more expected that NVMM may store persistent data that must than one order of magnitude higher than previously reported provide crash recoverability, a property where a system can slowdown. always recover to a consistent memory state after a crash. In this paper, we analyze and derive invariants that are Crash recoverability property offers multiple benefits, such as needed to ensure correct crash recovery (i.e., correct plaintext allowing persistent data to be kept in memory data structures value is recovered and no integrity verification failure is instead of in files, and as a fault tolerance technique to reduce triggered). Then, to reduce the performance overheads, we pro- pose performance optimizations, which we refer to as persist- This work was supported in part by grant 1717550 from NSF, and by UCF. The work was initially started under the direction of Solihin while at NCSU level parallelism, or PLP, that comply with the invariants for and further co-directed by Zhou and Solihin at NCSU and UCF, respectively. strict and epoch persistency (EP) models. For SP, we found that pipelining BMT updates is an effective PLP optimization, memory [29], [32], [44], [53], [67] or sent to other processor which brings down the performance overheads from 7:2× to chips [42], [44], [64]. Counter mode encryption [52], [60], [61] 2:1× when protecting non-stack regions, compared to a secure is commonly used for this purpose. It works by encrypting a processor model with write back caches but not supporting any counter to generate a pseudo one time pad (OTP) which is persistency model. We then analyze EP where persist ordering XORed with the plaintext (or ciphertext) to get ciphertext (or within an epoch is relaxed, but enforced across epochs. Under plaintext). To be secure, pads cannot be reused, and hence EP, two more PLP optimizations were enabled besides pipelin- the counter must be incremented after each write back (for ing: out-of-order BMT update and BMT update coalescing. temporal uniqueness) and concatenated with address to form These two optimizations reduce overheads to 20.2%. a seed (for spatial uniqueness). Counters may be monolithic To summarize, the contributions of this paper are: (as in Intel SGX [12], [18]) or split (as in Yan et al. [60]). • To our knowledge, this is the first work that fully analyzes Split counter co-locates a per-page major counter and many crash recovery correctness for secure NVMM, and formu- per-block minor counters on a single cache block, and each lates crash recovery invariants required under different cache block is represented by the concatenation of a major persistency models. and a minor counter. Due to its much lower memory overhead • For strict persistency, we propose a new optimization for (1.56% vs. 12.5% with monolithic counter [60]), counter cache pipelining BMT updates. performance increases and the overall decryption overhead • For epoch persistency, we propose two new optimiza- decreases. Hence, we assume the use of a split counter tions: out-of-order BMT updates and BMT update coa- organization for the rest of the paper. lescing. Memory Integrity Verification Memory encrypted using • We point out that, many techniques in prior studies counter mode encryption is vulnerable to a counter replay did not completely guarantee crash recovery and hence attack which allows the attacker to break the encryption [60], substantially underestimated its performance overheads. hence memory integrity verification is needed not only to • An evaluation showing that our proposed PLP optimiza- protect data integrity, but also to protect encryption from trivial tions above significantly reduce the performance over- cryptanalysis [39], [65]. Data fetched from off-chip memory head of secure NVMM. must be decrypted and its integrity verified when it arrives on The remainder of the paper is organized as follows. Sec- chip. In multiprocessors, data supplied from other processor tion II presents the background and related work. Section III chips also need to be verified [42], [44]. Early memory formulates the invariants to be ensured in order to support integrity protection relied on Merkle Tree covering the entire crash recovery for secure NVMM. Section IV details four memory [16] with on chip tree root. When using counter BMT update models, including the baseline used for evalu- mode encryption, Rogers et al. proposed Bonsai Merkle Tree ation and the three proposed ones. Section V discusses our (BMT) [43] that employs stateful MACs to protect data, hardware architecture. Section VI presents our experimen- leaving a much smaller and shallower tree covering only tal methodology. Section VII evaluates our proposed update counters. A stateful MAC uses data, address, and counter mechanisms, and Section VIII concludes this work. as input to the MAC calculation; any modification to any MAC input or the MAC itself becomes detectable. Since II. BACKGROUND AND RELATED WORK it is sufficient to have one input component with freshness Threat Model We assume an adversary who has physical protection, BMT only needs to cover counters. Intel SGX access to the memory system (NVMM and

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    14 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us