Lune

OSDI2024Top-tier venue

Automatically Reasoning About How Systems Code Uses the CPU Cache

Rishabh R. Iyer, Katerina J. Argyraki, George Candea

Abstract

We present a technique, called CFAR, that developers can use to reason precisely about how their code, as well as thirdparty code, uses the CPU cache. Given a piece of systems code P, CFAR employs program analysis and binary instrumentation to automatically "distill" how P accesses memory, and uses "projectors" on top of the extracted distillates to answer specific questions about P's cache usage. CFAR comes with three example projectors that report (1) how P's cache footprint scales across unseen inputs; (2) the cache hits and misses incurred by P for each class of inputs; and (3) potential vulnerabilities in cryptographic code caused by secretdependent cache-access patterns.

We implemented CFAR in an eponymous tool with which we analyze a performance-critical subset of four TCP stackstwo versions of the Linux stack, a stack used by the IX kernelbypass OS, and the lwIP TCP stack for embedded systemsas well as 7 algorithm implementations from the OpenSSL cryptographic library, all 51 system calls of the Hyperkernel, and 2 hash-table implementations. We show how CFAR enables developers to not only identify performance bugs and security vulnerabilities in their own code but also understand the performance impact of incorporating third-party code into their systems without doing elaborate benchmarking.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Heuristic Analysis from Source Code via Symbolic-Guided Optimization cites Automated Reasoning and Detection of Specious Configuration in Large Systems with Symbolic Execution
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Performance Interfaces for Hardware AcceleratorsJiacheng Ma, Rishabh R. Iyer, Sahand Kashani, Mahyar Emami et al.OSDI 2024 · 3 citations
  2. Heuristic Analysis from Source Code via Symbolic-Guided OptimizationPantea Karimi, Siva Kesava Reddy Kakarla, Ryan Beckett, Santiago Segarra et al.NSDI 2026

Builds on13

  1. Verifying Constant-Time ImplementationsJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, François Dupressoir et al.USENIX Security 2016 · 274 citations
  2. The Demikernel Datapath OS Architecture for Microsecond-scale Datacenter SystemsIrene Zhang, Amanda Raybuck, Pratyush Patel, Kirk Olynyk et al.SOSP 2021 · 83 citations
  3. Memory-harvesting VMs in cloud platformsAlexander Fuerst, Stanko Novakovic, Iñigo Goiri, Gohar Irfan Chaudhry et al.ASPLOS 2022 · 39 citations
  4. Automated Reasoning and Detection of Specious Configuration in Large Systems with Symbolic ExecutionYigong Hu, Gongqi Huang, Peng HuangOSDI 2020 · 31 citations
  5. DMon: Efficient Detection and Correction of Data Locality Problems Using Selective ProfilingTanvir Ahmed Khan, Ian Neal, Gilles Pokam, Barzan Mozafari et al.OSDI 2021 · 31 citations

Related papers

  1. Quantifying and Mitigating Cache Side Channel Leakage with Differential SetCong Ma, Dinghao Wu, Gang Tan, Mahmut Taylan Kandemir et al.OOPSLA 2023 · 2 citations
  2. Precise Detection of Kernel Data Races with Probabilistic Lockset AnalysisGabriel Ryan, Abhishek Shah, Dongdong She, Suman JanaS&P 2023
  3. GhostRace: Exploiting and Mitigating Speculative Race ConditionsHany Ragab, Andrea Mambretti, Anil Kurmus, Cristiano GiuffridaUSENIX Security 2024 · 10 citations
  4. CROSS-X: Generalized and Stable Cross-Cache Attack on the Linux KernelDong-ok Kim, Juhyun Song, Insu YunCCS 2025
  5. CacheD: Identifying Cache-Based Timing Channels in Production SoftwareShuai Wang, Pei Wang, Xiao Liu, Danfeng Zhang et al.USENIX Security 2017 · 130 citations
Dusk over the sea between two cliffs drawn in fine vertical lines