HackerPapers

arXiv:1802.09517cs.CR

Memory Tagging and how it improves C/C++ memory safety

Kostya Serebryany, Evgenii Stepanov, Aleksey Shlyapnikov, Vlad Tsyrklevich, Dmitry Vyukov

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

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.

arXiv comments
Journal reference
DOI
Subjects
cs.CRCryptography and Security cs.ARHardware Architecture cs.PLProgramming Languages

On Hacker News

Linked by 1 identifiable commenter in 2 comments across 2 threads, from Dec 2018 to May 2019. Found in 1 HN submission from Feb 2018 to Feb 2018. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments2 threads

    • > Sanitizers are a game changer, they bring C++ closer to languages like Java and Rust. This is a stretch, IMO. I suppose it is ever-so-slightly-closer. > They do not bring the safety to production, since you probably do not want to use sanitizers in production or release You're…

      wyldfireView on HNParent context

    • IIRC the ARM tagging would protect ~8 (maybe 16?) byte regions. More info on this is at [1] [2] -- note that some of this discusses a software-only approach (with likely higher performance impact). I think the majority of performance cost for HW Asan will come from the…

      wyldfireView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.