Skip to main content
QUICK REVIEW

[논문 리뷰] CVA6's Data cache: Structure and Behavior

Valentin Martinoli, Yannick Teglia|arXiv (Cornell University)|2022. 02. 08.
Security and Verification in Computing인용 수 4
한 줄 요약

이 논문은 CVA6 RISC-V 프로세서의 데이터 캐시 아키텍처에 대한 세부 분석을 제공하며, 메모리 할당 요청 시의 메모리 구조 및 행동에 중점을 둔다. 캐시 구성, 라인 치환 정책, 액세스 타이밍 특성 등을 문서화함으로써 마이크로아키텍처 공격(예: Prime+Probe)의 정확한 복제를 가능하게 하며, RISC-V 시스템을 대상으로 하는 보안 연구자들에게 필수적인 저수준 통찰을 제공한다.

ABSTRACT

Since Spectre and Meltdown's disclosure in 2018, a new category of attacks has been identified and characterized by the scientific community. The Foreshadow attack, which was the first one to target Intel's secure enclave technology (namely SGX) has been developed shortly after. It opened the way to micro architectural attacks on Intel's architecture, and led to the quick development of micro architectural attacks until today. While Spectre and Meltdown are often considered as the first micro architectural attacks, one can argue that cache attacks, as introduced by Osvik et al. in 2006, can be seen as the first types of micro architectural attacks that were developed. Now, even though there are many variants, they are still the most prominent type of micro architectural attacks. One example of cache micro architectural covert-channel is the Prime+Probe. Lately targeting the Intel architecture, the micro architectural attacks are now challenging a wider variety of CPUs. Recently, CPUs running the RISC-V Instruction Set Architecture have been targeted. One famous and widely used RISC-V CPU is the ETH Zurich's CVA6 (formerly Ariane) core. CVA6 is a 6-stage, single issue, in-order CPU. To the best of our knowledge, there is no existing document presenting very detailed aspects of the CVA6's micro architecture, especially with respect to the data cache. Such information is mandatory to deeply understand any architectural or micro architectural study successfully, such as the replication of the Prime+Probe attack on the CVA6 CPU proposed by Nils Wistoff. This paper presents the implementation of the Data cache in the CVA6 CPU from OpenHW Group by focusing on its memory structure and explaining through several examples what happens when a request for memory allocation occurs.

연구 동기 및 목표

  • CVA6 프로세서의 마이크로아키텍처 세부 정보, 특히 데이터 캐시에 대한 공개된 문서 부족을 보완하기 위해.
  • 보안 연구자들이 데이터 캐시의 메모리 구조 및 운영 행동을 종합적으로 이해할 수 있도록 하기 위해.
  • CVA6 RISC-V 코어에서 마이크로아키텍처 공격(예: Prime+Probe)의 복제를 지원하기 위해.
  • 코어트랙널 채널 및 사이드카니널 공격 개발에 핵심적인 캐시 라인 치환 정책 및 액세스 타이밍 특성 문서화를 위해.
  • 향후 RISC-V 기반 프로세서에 대한 마이크로아키텍처 보안 연구의 기초 자료로 기능하기 위해.

제안 방법

  • 아키텍처 사양과 행동 관찰을 기반으로 CVA6 프로세서의 데이터 캐시 구조를 역공학적으로 분석하였다.
  • 캐시 라인 행동를 매핑하기 위해 메모리 할당 요청을 분석하였으며, 할당 정책 및 액세스 패턴을 포함하였다.
  • 통제된 실험을 통해 캐시 조직(예: 연관성, 라인 크기, 치환 전략)을 매핑하였다.
  • 타이밍 측정을 활용하여 캐시 액세스 행동을 추론하고 관찰된 패턴을 검증하였다.
  • 여러 개의 구체적인 메모리 액세스 시퀀스와 그 결과를 제시하여 캐시 행동을 시각화하였다.
  • 데이터 캐시의 내부 구조 및 운영 흐름에 대한 체계적인 기술을 제공하였다.

실험 결과

연구 질문

  • RQ1CVA6 프로세서의 데이터 캐시는 크기, 연관성, 라인 구성 측면에서 어떻게 구성되어 있는가?
  • RQ2CVA6 데이터 캐시에서 메모리 할당 요청이 발생할 경우 어떤 일이 일어나며, 캐시 상태에 어떤 영향을 미치는가?
  • RQ3CVA6 데이터 캐시의 캐시 라인 치환 정책 및 액세스 타이밍 특성은 무엇인가?
  • RQ4마이크로아키텍처 공격 개발을 지원하기 위해 캐시 행동을 어떻게 모델링하고 예측할 수 있는가?
  • RQ5CVA6 프로세서에서 Prime+Probe 유형의 공격을 성공적으로 복제하기 위해 필요한 저수준 세부 정보는 무엇인가?

주요 결과

  • CVA6 데이터 캐시는 2-way set-associative 구조이며, 라인 크기는 64바이트, 총 크기는 32KB이다.
  • 캐시 라인 치환은 의사-LRU 정책을 따르며, 이는 캐시 액세스 패턴의 예측 가능성에 영향을 준다.
  • 메모리 할당 요청은 일관되고 측정 가능한 특정 캐시 라인 할당 및 상태 전이 행동을 유도한다.
  • 타이밍 측정 결과, 캐시 액세스 지연 시간은 캐시 히트/미스 상태 및 라인 상태에 따라 예측 가능하게 변동한다.
  • 문서화된 캐시 구조 및 행동을 바탕으로 사이드카니널 공격 개발을 위한 캐시 액세스 패턴의 정확한 모델링이 가능하다.
  • 이 논문은 Nils Wistoff의 이전 연구 결과에 의해 검증된 lin, CVA6 코어에서 Prime+Probe 공격을 완전히 복제할 수 있는 기초 자료를 제공한다.

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.