arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2212.05614cs.CRcs.AR
收藏

RISC-V二进制文件的通用标记

Generic Tagging for RISC-V Binaries

David Demicco, Matthew Cole, Gokturk Yuksek, Ravi Theja Gollapudi, Aravind Prakash, Kanad Ghose, Zerksis Umrigar

摘要:

随着RISC-V(一种开源ISA)的广泛普及,针对特定国防需求的定制硬件安全解决方案越来越受欢迎。这些解决方案通常需要专门的编译器,可以将元数据(称为标签)插入到生成的二进制文件中,和/或使用新指令扩展RISC-V ISA。开发这样的编译器可能是一个冗长而耗时的过程。在本文中,我们提出了COGENT,一个通用的指令标记生成器的RISC-V架构。COGENT能够将可配置和可变宽度(1到20位)的标记与每个指令相关联。它还能够发出对控制流完整性(CFI)解决方案的实现至关重要的标签。COGENT将所有标记和标签编码为nop指令,从而提供完全的向后兼容性。我们在SPEC CPU 2017基准测试套件的一个程序子集上评估了COGENT,并报告了最低和最高标签覆盖水平的二进制大小分别增加了29.3%和18.27%。此外,我们在COTS RISC-V未修改的硬件上执行标记程序,发现最低和最高覆盖级别的执行时间开销(相对于向后兼容性)分别为13.4%和5.72%。最后,使用案例研究,我们提出了可能的用例场景,COGENT可以应用。

英文摘要:

With the widespread popularity of RISC-V -- an open-source ISA -- custom hardware security solutions targeting specific defense needs are gaining popularity. These solutions often require specialized compilers that can insert metadata (called tags) into the generated binaries, and/or extend the RISC-V ISA with new instructions. Developing such compilers can be a tedious and time-consuming process. In this paper, we present COGENT, a generic instruction tag generator for RISC-V architecture. COGENT is capable of associating a tag of configurable and varying widths (1 to 20 bits) to each instruction. It is also capable of emitting labels that are central to the implementation of control-flow integrity (CFI) solutions. COGENT encodes all tags and labels as nop instructions thereby providing full backward compatibility. We evaluate COGENT on a subset of programs from the SPEC CPU2017 benchmark suite and report the binary size increase to be 29.3% and 18.27% for the lowest and highest tag coverage levels respectively. Additionally, we executed tagged programs on COTS RISC-V unmodified hardware and found the execution time overhead (with respect to backward compatibility) to be 13.4% and 5.72% for the lowest and highest coverage levels respectively. Finally, using a case study, we present possible use case scenarios where COGENT can be applied.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑