论文标题

并行二进制代码分析

Parallel Binary Code Analysis

论文作者

Meng, Xiaozhu, Anderson, Jonathon M., Mellor-Crummey, John, Krentel, Mark W., Miller, Barton P., Milaković, Srđan

论文摘要

二进制代码分析被广泛用于评估程序的正确性,性能和出处。二进制分析应用程序通常会构建控制流程图,分析数据流并使用调试信息来了解机器代码与源线,封闭的函数和数据类型的关系。迄今为止,二进制分析已经是单线程,对于诸如性能分析和软件取证等应用程序的应用程序太慢了,在该应用程序中,分析大小千兆字节和包含数千个二进制文件的大批次的二进制文件变得普遍。 本文介绍了我们的设计和实现,以加速使用带有多线程的二进制文件构建控制流程图(CFG)的任务。现有的研究重点是解决构建CFG期间遇到的具有挑战性的代码结构,包括共享代码,跳台分析,非退回功能和尾巴调用的功能。但是,现有的分析并未考虑共享代码的并发分析之间的复杂相互作用,因此很难将现有的串行算法扩展到并行。一种指导并行算法设计的系统方法是必不可少的。我们将构建CFG的任务抽象为几个核心CFG操作的重复应用程序,以创建功能,基本块和边缘。然后,我们在CFG操作之间得出属性,包括操作依赖性,通勤性,单调性。这些操作属性指导我们的设计用于构建CFG的新的并行分析。我们在64个硬件线程上构建CFG的速度达到了多达25美元$ \ times $速度。通过新的并行分析,二进制分析应用程序可显着加速:我们的性能分析工具实现了8 $ \ times $,对于带有16个硬件线程的软件法医工具,我们实现了7 $ \ times $。

Binary code analysis is widely used to assess a program's correctness, performance, and provenance. Binary analysis applications often construct control flow graphs, analyze data flow, and use debugging information to understand how machine code relates to source lines, inlined functions, and data types. To date, binary analysis has been single-threaded, which is too slow for applications such as performance analysis and software forensics, where it is becoming common to analyze binaries that are gigabytes in size and in large batches that contain thousands of binaries. This paper describes our design and implementation for accelerating the task of constructing control flow graphs (CFGs) from binaries with multithreading. Existing research focuses on addressing challenging code constructs encountered during constructing CFGs, including functions sharing code, jump table analysis, non-returning functions, and tail calls. However, existing analyses do not consider the complex interactions between concurrent analysis of shared code, making it difficult to extend existing serial algorithms to be parallel. A systematic methodology to guide the design of parallel algorithms is essential. We abstract the task of constructing CFGs as repeated applications of several core CFG operations regarding to creating functions, basic blocks, and edges. We then derive properties among CFG operations, including operation dependency, commutativity, monotonicity. These operation properties guide our design of a new parallel analysis for constructing CFGs. We achieved as much as 25$\times$ speedup for constructing CFGs on 64 hardware threads. Binary analysis applications are significantly accelerated with the new parallel analysis: we achieve 8$\times$ for a performance analysis tool and 7$\times$ for a software forensic tool with 16 hardware threads.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源