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 2022Publication 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.Google ScholarGoogle Scholar
  2. MITRE, "Cwe top 25 most dangerous software errors," 2021.Google ScholarGoogle Scholar
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S. Nagarakatte, Zhao, et al., "Cets: compiler enforced temporal safety for c," in ACM Sigplan Notices, vol. 45, pp. 31--40, ACM, 2010.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  8. K. Serebryany, D. Bruening, et al., "Addresssanitizer: A fast address sanity checker," in USENIX'12, p. 28, USENIX Association, 2012.Google ScholarGoogle Scholar
  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.Google ScholarGoogle Scholar
  10. ARM, "Arm memory tagging extension whitepape," 2019.Google ScholarGoogle Scholar
  11. Woodruff et al., "The cheri capability model: Revisiting risc in an age of risk," in ISCA'14, pp. 457--468, IEEE, 2014.Google ScholarGoogle Scholar
  12. S. Nagarakatte et al., "Watchdoglite: Hardware-accelerated compiler-based pointer checking," in Proc. CGO, 2014.Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. R. Ramakesavan, D. Zimmerman, and P. Singaravelu, "Intel memory protection extensions (intel mpx) enabling guide," 2015.Google ScholarGoogle Scholar
  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.Google ScholarGoogle Scholar
  15. C. Lattner and V. Adve, "LLVM: a compilation framework for lifelong program analysis transformation," in Proc. CGO, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  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.Google ScholarGoogle Scholar
  17. K. Asanovic et al., "The rocket chip generator," EECS, UCB, Tech. Rep. UCB/EECS-2016-17, 2016.Google ScholarGoogle Scholar
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. J. L. Henning, "SPEC CPU2006 benchmark descriptions," SIGARCH Comput. Archit. News, vol. 34, p. 1--17, Sept. 2006.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Waterman et al., "Spike RISC-V ISA simulator," 2016.Google ScholarGoogle Scholar
  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.Google ScholarGoogle Scholar

Index Terms

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

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • 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

        Copyright © 2022 ACM

        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]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 23 August 2022

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate1,770of5,499submissions,32%

        Upcoming Conference

        DAC '24
        61st ACM/IEEE Design Automation Conference
        June 23 - 27, 2024
        San Francisco , CA , USA
      • Article Metrics

        • Downloads (Last 12 months)59
        • Downloads (Last 6 weeks)6

        Other Metrics

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader