paperbot · PL 论文追踪

全部论文 待读 收藏

P2 COGENT: Adaptable Compiler Toolchain for Tagging RISC-V Binaries

COGENT:面向 RISC-V 二进制标记的可适配编译器工具链
ASPLOS Proceedings of the 30th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 32025匹配度 2/10 · 论文聚焦 RISC-V 二进制指令标记与编译工具链(多粒度/变宽标签、CFI),属于编译与体系结构安全方向;未涉及 LLM/Agent、机器学习系统静态分析、浮点或贝叶斯程序分析,与核心研究方向仅 PL/编译器层面弱相关。引用 0 inbox
David B. Demicco, Matthew Cole, Gokturk Yuksek, RaviTheja Gollapudi, Aravind Prakash, Kanad Ghose, Zerksis Umrigar
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出基于 LLVM 的 RISC-V 指令标记编译器工具链 COGENT,支持多粒度可变宽度标签并生成 CFI 控制流标签。

标签(metadata)可为软件附加领域信息,并由硬件在运行时执行安全与测试策略,但为特定架构开发能编码标签的定制编译器通常繁琐耗时。本文提出 COGENT:一个面向 RISC-V 的灵活且功能丰富的指令标签生成编译器工具链,核心为基于 LLVM 的编译器,并配有标签感知反汇编器与标签完整性检查器。COGENT 支持按函数、基本块或指令等多种粒度生成标签,指令标签宽度可为 1–32 位,函数与基本块标签可为任意宽度,还可生成用于控制流完整性(CFI)的控制流标签。评估检查了标签正确性、性能开销及 IR 级标签在下层的保留情况,并展示 CFI、自适应追踪与硬件级函数追踪三个示例应用;标记代码平均周期开销最差为 5.24%、最好为 0.94%,适合调试与 fuzzing 等测试场景。

问题
为特定目标架构开发能够编码标签的定制编译器与工具链通常繁琐耗时,而标签又需被硬件用于运行时安全与测试策略。
方法
提出 COGENT,一个基于 LLVM 的 RISC-V 标签编译器工具链,辅以标签感知反汇编器和标签完整性检查器,支持按函数、基本块或指令生成标签、可变宽度标签以及 CFI 控制流标签。
评估
通过标签正确性、性能开销和 IR 级标签低层保留情况进行评估,并以控制流完整性、自适应追踪和硬件级函数追踪作为示例应用,标记代码平均周期开销在 5.24% 到 0.94% 之间。
原文摘要(Abstract)

Tags, or metadata, enrich software with domain-specific information that is consumed by hardware to enforce security and testing policies during runtime. However, given a target architecture, developing custom compilers that encode tags can be tedious and time-consuming. We present COGENT, a highly flexible and feature-rich compiler toolchain for instruction tag generation on the RISC-V architecture. Central to this effort is a LLVM-based compiler that is supplemented with a tag-aware disassembler and a tag integrity checker. COGENT is capable of: (a) generating tags at one or more of varying granularity (per function, per basic block, or per instruction), and (b) associating variable-width tags (1-32 bits) to instructions, and arbitrary-width tags to each function or basic block. Additionally, COGENT is capable of emitting control-flow labels, which are crucial in asserting control-flow integrity (CFI), a runtime property that aids in detecting bugs and exploits that violate control flow. We evaluate the correctness of tags generated by COGENT's compiler and the associated performance penalties, along with how well COGENT preserves IR-level tags at the lower level. We provide three exemplar applications-Control Flow Integrity, Adaptive Tracing, and Hardware-Level Function Tracing that can leverage COGENT. The tagged code incurs an average cycle count overhead from 5.24% to 0.94% in the worst and best cases, respectively, making it ideal for debugging and testing applications, including fuzzing.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@inproceedings{DemiccoCYGPGU25,
  title = {COGENT: Adaptable Compiler Toolchain for Tagging RISC-V Binaries},
  author = {David B. Demicco and Matthew Cole and Gokturk Yuksek and RaviTheja Gollapudi and Aravind Prakash and Kanad Ghose and Zerksis Umrigar},
  booktitle = {ASPLOS},
  year = {2025},
  doi = {10.1145/3676642.3736125}
}