Comprehensive Kernel Instrumentation via Dynamic Binary Translation

被引:0
作者
Feiner, Peter [1 ]
Brown, Angela Demke [1 ]
Goel, Ashvin [1 ]
机构
[1] Univ Toronto, Toronto, ON M5S 1A1, Canada
基金
加拿大自然科学与工程研究理事会;
关键词
Design; Performance; Dynamic binary translation; operating system instrumentation; Linux; interrupts;
D O I
10.1145/2248487.2150992
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Dynamic binary translation (DBT) is a powerful technique that enables fine-grained monitoring and manipulation of an existing program binary. At the user level, it has been employed extensively to develop various analysis, bug-finding, and security tools. Such tools are currently not available for operating system (OS) binaries since no comprehensive DBT framework exists for the OS kernel. To address this problem, we have developed a DBT framework that runs as a Linux kernel module, based on the user-level DynamoRIO framework. Our approach is unique in that it controls all kernel execution, including interrupt and exception handlers and device drivers, enabling comprehensive instrumentation of the OS without imposing any overhead on user-level code. In this paper, we discuss the key challenges in designing and building an in-kernel DBT framework and how the design differs from user-space. We use our framework to build several sample instrumentations, including simple instruction counting as well as an implementation of shadow memory for the kernel. Using the shadow memory, we build a kernel stack overflow protection tool and a memory addressability checking tool. Qualitatively, the system is fast enough and stable enough to run the normal desktop workload of one of the authors for several weeks.
引用
收藏
页码:135 / 146
页数:12
相关论文
共 50 条
[21]   A Hardware-assisted Translation Cache for Dynamic Binary Translation in Embedded Systems [J].
Salgado, Filipe ;
Gomes, Tiago ;
Tavares, Adriano ;
Cabral, Jorge .
2018 IEEE 23RD INTERNATIONAL CONFERENCE ON EMERGING TECHNOLOGIES AND FACTORY AUTOMATION (ETFA), 2018, :307-312
[22]   A dynamic binary translation system in a client/server environment [J].
Hsu, Chun-Chen ;
Hong, Ding-Yong ;
Hsu, Wei-Chung ;
Liu, Pangfeng ;
Wu, Jan-Jan .
JOURNAL OF SYSTEMS ARCHITECTURE, 2015, 61 (07) :307-319
[23]   Efficient LLVM-Based Dynamic Binary Translation [J].
Engelke, Alexis ;
Okwieka, Dominik ;
Schulz, Martin .
PROCEEDINGS OF THE 17TH ACM SIGPLAN/SIGOPS INTERNATIONAL CONFERENCE ON VIRTUAL EXECUTION ENVIRONMENTS (VEE '21), 2021, :165-171
[24]   Exploiting Longer SIMD Lanes in Dynamic Binary Translation [J].
Hong, Ding-Yong ;
Fu, Sheng-Yu ;
Liu, Yu-Ping ;
Wu, Jan-Jan ;
Hsu, Wei-Chung .
2016 IEEE 22ND INTERNATIONAL CONFERENCE ON PARALLEL AND DISTRIBUTED SYSTEMS (ICPADS), 2016, :853-860
[25]   Efficient and retargetable SIMD translation in a dynamic binary translator [J].
Fu, Sheng-Yu ;
Hong, Ding-Yong ;
Liu, Yu-Ping ;
Wu, Jan-Jan ;
Hsu, Wei-Chung .
SOFTWARE-PRACTICE & EXPERIENCE, 2018, 48 (06) :1312-1330
[26]   Research on Pipeline-Based Dynamic Binary Translation [J].
Liu, Jikun ;
Cao, Gaojin ;
Zhang, Hongguang .
2013 3RD INTERNATIONAL CONFERENCE ON COMPUTER SCIENCE AND NETWORK TECHNOLOGY (ICCSNT), 2013, :601-604
[27]   Cache load balancing oriented dynamic binary translation [J].
Li, Zhanhui ;
Liu, Chang ;
Meng, Jianyi ;
Yan, Xiaolang .
Jisuanji Yanjiu yu Fazhan/Computer Research and Development, 2015, 52 (09) :2105-2113
[28]   Optimization of Library Function Disposing in Dynamic Binary Translation [J].
Fu L. ;
Pang J. ;
Wang J. ;
Zhang J. ;
Yue F. .
Jisuanji Yanjiu yu Fazhan/Computer Research and Development, 2019, 56 (08) :1783-1791
[29]   Using Pcache to Speedup Interpretation in Dynamic Binary Translation [J].
Chen, Wei ;
Lu, Hongyi ;
Shen, Li ;
Wang, Zhiying ;
Xiao, Nong .
2009 IEEE INTERNATIONAL SYMPOSIUM ON PARALLEL AND DISTRIBUTED PROCESSING WITH APPLICATIONS, PROCEEDINGS, 2009, :525-530
[30]   Hybrid Binary Rewriting for Memory Access Instrumentation [J].
Roy, Amitabha ;
Hand, Steven ;
Harris, Tim .
ACM SIGPLAN NOTICES, 2011, 46 (07) :227-238