Please wait a minute...
浙江大学学报(工学版)
自动化技术、电信技术     
基于QEMU的跨平台静态二进制翻译系统
卢帅兵,庞建民,单征,岳峰
解放军信息工程大学  数学工程与先进计算国家重点实验室, 河南 郑州 450001
Retargetable static binary translator based on QEMU
LU Shuai bing, PANG Jian min, SHAN Zheng, YUE Feng
State Key Laboratory of Mathematical Engineering and Advanced Computing,PLA Information Engineering University, Zhengzhou 450001, China
 全文: PDF(887 KB)   HTML
摘要:

为了实现快速映射间接分支目标地址,提出地址索引映射表法,使用地址数组按源地址顺序保存所有对应的目的地址,索引数组存储源地址在地址数组中的索引位置,只需要几条指令就可以完成源地址到目的地址的映射,提高了执行速度.为了加快函数的调用处理,提出将本地栈作为影子栈、与本地库函数封装相结合的方法.本地栈模拟参数传递和返回,加速函数调用.结合封装接口处理参数和返回值,实现间接调用本地库函数,提高了函数处理能力.基于上述方法和QEMU,设计并实现了静态二进制翻译系统SQEMU.基于SPEC2006和nbench测试集,从x86平台翻译到Alpha平台的实验表明,SQEMU相对QEMU平均加速比分别达2.09倍和6.39倍.

Abstract:

Address indexed mapping table (AMT) was presented to efficiently handle indirect branches. An address array was used to store all target addresses, and an index array was used to contain the index values of all source addresses in address array. Using index, only several instructions were used to map a source address to the corresponding target address, and the speed of execution was improved. An approach combining shadow stack and native library jacketing was presented to efficiently handle function call. The speed of function call was improved by passing parameters and returning value in native stack. Native function can be indirectly called by handling parameters and return value of native library function through jacketing interface. Static QEMU (SQEMU) was designed and implemented based on these approaches and QEMU. For x86 codes to Alpha platforms, SQEMU gains factors of 2.09 and 6.39 times speedup over QEMU for the SPEC2006 and nbench benchmarks respectively.

出版日期: 2016-03-31
:  TP 314  
基金资助:

国家自然科学基金资助项目(61472447).

通讯作者: 庞建民,男,教授. ORCID: 0000 0002 3216 8970.     E-mail: jianmin_pang@hotmail.com
作者简介: 卢帅兵(1990-),男,硕士生,从事计算机体系结构、软件安全的研究. ORCID: 0000 0002 8975 4620. E-mail: yeaxxx@163.com
服务  
把本文推荐给朋友
加入引用管理器
E-mail Alert
RSS
作者相关文章  

引用本文:

卢帅兵,庞建民,单征,岳峰. 基于QEMU的跨平台静态二进制翻译系统[J]. 浙江大学学报(工学版), 10.3785/j.issn.1008-973X.2016.01.023.

LU Shuai bing, PANG Jian min, SHAN Zheng, YUE Feng. Retargetable static binary translator based on QEMU. JOURNAL OF ZHEJIANG UNIVERSITY (ENGINEERING SCIENCE), 10.3785/j.issn.1008-973X.2016.01.023.

链接本文:

http://www.zjujournals.com/eng/CN/10.3785/j.issn.1008-973X.2016.01.023        http://www.zjujournals.com/eng/CN/Y2016/V50/I1/158

[1] ALTMAN E, KAELI D, SHEFFER Y. Welcome to the opportunities of binary translation [J]. IEEE Computer, 2000, 33(3): 40-45.
[2] SHAN Zheng, GUO Hao ran, PANG Jian min. BTMD: a framework of binary translation based Malcode detector [C]∥ 2012 International Conference on Cyber Enabled Distributed Computing and Knowledge Discovery. [S. l.]: IEEE, 2012: 39-43.
[3] CHERNOFF A, HOOKWAY R. DIGITAL FX! 32 running 32 bit× 86 applications on Alpha NT [C]∥Proceedings of the USENIX Windows NT Workshop on the USENIX Windows NT Workshop. [S. l.]: USENIX, 1997: 37-42.
[4] CRISTINA C, VAN EMMERIK M. UQBT: adaptable binary translation at low cost [J]. IEEE Computer, 2000, 33(3): 60-66.
[5] 廖银. 动态二进制翻译建模及其并行化研究[D]. 合肥: 中国科学技术大学, 2013.
LIAO Yin. Dynamic binary translation modeling and parallelization research [D]. Hefei:University of Science and Technology of China, 2013.
[6] JIA Ning, YANG Chun, WANG Jing, et al. SPIRE: improving dynamic binary translation through SPC indexed indirect branch redirecting [C]∥ ACM SIGPLAN Notices. [S. l.]: ACM, 2013: 1-12.
[7] HISER J D, WILLIAMS D, MARS J, et al. Evaluating indirect branch hadling mechanisms in software dynamic translation systems [C]∥International Symposium on Code Generation and Optimization. California: San Jose, 2007: 61-73.
[8] SUN Ting tao, YANG Yin dong, YANG Hong bo, et al. Return instruction analysis and optimization in dynamic binary translation [C]∥4th International Conference on Frontier of Computer Science and Technology. Shanghai: IEEE, 2009: 435-440.
[9] JEFFERY A. Using the LLVM compiler infrastructure for optimized, asynchronous dynamic translation in Qemu [D]. South Australia: University of Adelaide Honors Thesis, 2009.
[10] LIAO Yin, SUN Guang zhong, JIANG Hai tao, et al. All registers mapping method in dynamic binary translation [J]. Computer Applications and Software, 2011, 28(11): 21-48.
[11] FABRICE B. Qemu, a fast and portable dynamic translator [C]∥Proceedings of the USENIX 2005 Annual Technical Conference, FREENIX Track. Anaheim: [s. n.], 2005: 41-46.
[12] CHEN Jiunn yeu, YANG Wuu, HUANG Jack, et al. A static binary translator for efficient migration of ARM based applications [C]∥Proceedings of the 6th Workshop on Optimizations for DSP and Embedded Systems. Boston: [s.n.], 2008.
[13] LLVM QEMU, Backend for QEMU using LLVM components [CP/OL]. [2014 12 12]. http:∥code.google.com/p/llvm qemu/.
[14] SHEN Bor yeh, YOU Jyun yan, YANG Wuu, et al. An LLVM based hybrid binary translation system [C]∥2012 7th IEEE International Symposium on Industrial Embedded Systems (SIES). Karlsruhe: IEEE, 2012: 229-236.

No related articles found!