Skip to main content
QUICK REVIEW

[Paper Review] Memory Tagging and how it improves C/C++ memory safety

Kostya Serebryany, Evgenii Stepanov|arXiv (Cornell University)|Feb 26, 2018
Security and Verification in ComputingComputer Science45 citations
TL;DR

The paper describes memory tagging as a technique to improve C/C++ memory safety, detailing two implementations: a full hardware SPARC approach and a partially hardware-assisted AArch64 compiler-based tool, and discusses their potential impact.

ABSTRACT

Memory safety in C and C++ remains largely unresolved. A technique usually called "memory tagging" may dramatically improve the situation if implemented in hardware with reasonable overhead. This paper describes two existing implementations of memory tagging: one is the full hardware implementation in SPARC; the other is a partially hardware-assisted compiler-based tool for AArch64. We describe the basic idea, evaluate the two implementations, and explain how they improve memory safety. This paper is intended to initiate a wider discussion of memory tagging and to motivate the CPU and OS vendors to add support for it in the near future.

Motivation & Objective

  • Motivate the need for improved memory safety in C/C++ and discuss the role memory tagging could play.
  • Describe two concrete implementations of memory tagging: SPARC hardware tagging and an AArch64 compiler-assisted tool.
  • Evaluate how these implementations improve memory safety and discuss broader implications for CPUs and OS vendors.

Proposed method

  • Explain the basic idea of memory tagging.
  • Describe the SPARC hardware implementation and its characteristics.
  • Describe the partially hardware-assisted compiler-based tool for AArch64.
  • Evaluate how tagging improves memory safety in practical terms.
  • Discuss implications and recommendations for CPU and OS vendor adoption.

Experimental results

Research questions

  • RQ1What is memory tagging and how can it improve memory safety for C/C++?
  • RQ2What are the characteristics and trade-offs of the SPARC hardware tagging implementation?
  • RQ3What are the characteristics and trade-offs of the AArch64 compiler-assisted tagging tool?
  • RQ4How might memory tagging influence CPU/OS ecosystem decisions and adoption?

Key findings

  • Two concrete memory tagging approaches are discussed: a full hardware SPARC implementation and a partially hardware-assisted AArch64 tool.
  • Memory tagging has the potential to significantly improve memory safety in C/C++ according to the authors.
  • The paper argues for broader discussion and hardware/OS vendor support to enable practical adoption.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.