skip to main content
10.1145/3489517.3530548acmconferencesArticle/Chapter ViewAbstractPublication PagesdacConference Proceedingsconference-collections
research-article

HWST128: complete memory safety accelerator on RISC-V with metadata compression

Published: 23 August 2022 Publication History

Abstract

Memory safety is paramount for secure systems. Pointer-based memory safety relies on additional information (metadata) to check validity when a pointer is dereferenced. Such operations on the metadata introduce significant performance overhead to the system. This paper presents HWST128, a system to reduce performance overhead by using hardware/software co-design. As a result, the system described achieves spatial and temporal safety by utilizing microarchitecture support, pointer analysis from the compiler, and metadata compression. HWST128 is the first complete solution for memory safety (spatial and temporal) on RISC-V. The system is implemented and tested on a Xilinx ZCU102 FPGA board with 1536 LUTs (+4.11%) and 112 FFs (+0.66%) on top of a Rocket Chip processor. HWST128 is 3.74× faster than the equivalent software-based safety system in the SPEC2006 benchmark suite while providing similar or better security coverage for the Juliet test suite.

References

[1]
Szekeres et al., "Sok: Eternal war in memory," in 2013 IEEE Symposium on Security and Privacy, pp. 48--62, IEEE, 2013.
[2]
MITRE, "Cwe top 25 most dangerous software errors," 2021.
[3]
G. C. Necula, McPeak, et al., "Ccured: Type-safe retrofitting of legacy code," in ACM SIGPLAN Notices, vol. 37, pp. 128--139, ACM, 2002.
[4]
J. Devietti et al., "Hardbound: architectural support for spatial safety of the c programming language," in ACM SIGARCH Computer Architecture News, vol. 36, pp. 103--114, ACM, 2008.
[5]
S. Nagarakatte, Zhao, et al., "Softbound: Highly compatible and complete spatial memory safety for c," ACM Sigplan Notices, vol. 44, no. 6, pp. 245--258, 2009.
[6]
S. Nagarakatte, Zhao, et al., "Cets: compiler enforced temporal safety for c," in ACM Sigplan Notices, vol. 45, pp. 31--40, ACM, 2010.
[7]
H. Dow, T. Li, W. Miles, and S. Parameswaran, "SHORE: hardware/software method for memory safety acceleration on RISC-V," in Design Automation Conference, 2021, pp. 289--294, IEEE, 2021.
[8]
K. Serebryany, D. Bruening, et al., "Addresssanitizer: A fast address sanity checker," in USENIX'12, p. 28, USENIX Association, 2012.
[9]
C. Kil, Jun, et al., "Address space layout permutation (aslp): Towards fine-grained randomization of commodity software," in ACSAC'06, pp. 339--348, IEEE, 2006.
[10]
ARM, "Arm memory tagging extension whitepape," 2019.
[11]
Woodruff et al., "The cheri capability model: Revisiting risc in an age of risk," in ISCA'14, pp. 457--468, IEEE, 2014.
[12]
S. Nagarakatte et al., "Watchdoglite: Hardware-accelerated compiler-based pointer checking," in Proc. CGO, 2014.
[13]
R. Ramakesavan, D. Zimmerman, and P. Singaravelu, "Intel memory protection extensions (intel mpx) enabling guide," 2015.
[14]
T. Zhang, D. Lee, and C. Jung, "Bogo: Buy spatial memory safety, get temporal memory safety (almost) free," in ASPLOS'19, pp. 631--644, 2019.
[15]
C. Lattner and V. Adve, "LLVM: a compilation framework for lifelong program analysis transformation," in Proc. CGO, 2004.
[16]
S. Das, Unnithan, et al., "Shakti-ms: a risc-v processor for memory safety in c," in Proc. LCTES, pp. 19--32, ACM, 2019.
[17]
K. Asanovic et al., "The rocket chip generator," EECS, UCB, Tech. Rep. UCB/EECS-2016-17, 2016.
[18]
C. Trippel, Y. A. Manerkar, D. Lustig, M. Pellauer, and M. Martonosi, "Tricheck: Memory model verification at the trisection of software, hardware, and isa," ACM SIGPLAN Notices, vol. 52, no. 4, pp. 119--133, 2017.
[19]
J. L. Henning, "SPEC CPU2006 benchmark descriptions," SIGARCH Comput. Archit. News, vol. 34, p. 1--17, Sept. 2006.
[20]
T. Boland and P. E. Black, "Juliet 1. 1 c/c++ and java test suite," Computer, vol. 45, no. 10, pp. 88--90, 2012.
[21]
Waterman et al., "Spike RISC-V ISA simulator," 2016.
[22]
Oleksenko et al., "Intel mpx explained: A cross-layer analysis of the intel mpx system stack," POMACS, vol. 2, no. 2, p. 28, 2018.

Index Terms

  1. HWST128: complete memory safety accelerator on RISC-V with metadata compression

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      DAC '22: Proceedings of the 59th ACM/IEEE Design Automation Conference
      July 2022
      1462 pages
      ISBN:9781450391429
      DOI:10.1145/3489517
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Sponsors

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 23 August 2022

      Permissions

      Request permissions for this article.

      Check for updates

      Qualifiers

      • Research-article

      Funding Sources

      • Aurstralian Research Council's Discovery Projects

      Conference

      DAC '22
      Sponsor:
      DAC '22: 59th ACM/IEEE Design Automation Conference
      July 10 - 14, 2022
      California, San Francisco

      Acceptance Rates

      Overall Acceptance Rate 1,770 of 5,499 submissions, 32%

      Upcoming Conference

      DAC '25
      62nd ACM/IEEE Design Automation Conference
      June 22 - 26, 2025
      San Francisco , CA , USA

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • 0
        Total Citations
      • 198
        Total Downloads
      • Downloads (Last 12 months)46
      • Downloads (Last 6 weeks)5
      Reflects downloads up to 05 Mar 2025

      Other Metrics

      Citations

      View Options

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Figures

      Tables

      Media

      Share

      Share

      Share this Publication link

      Share on social media