Patchouli: A Knowledge-Based Translation Framework for x86 Binary to Web Applications

碩士 === 國立交通大學 === 資訊科學與工程研究所 === 105 === Computer Network is not only a tool, but also one of the important roles on advancing modern civilization. Two main reasons are that the speed of spread and the amount of data through computer networking are much faster and greater than traditional media. To...

Full description

Bibliographic Details
Main Authors: Liu, Hong-Wei, 劉弘威
Other Authors: Shann, Jyh-Jiun
Format: Others
Language:en_US
Published: 2016
Online Access:http://ndltd.ncl.edu.tw/handle/06301278108264572778
Description
Summary:碩士 === 國立交通大學 === 資訊科學與工程研究所 === 105 === Computer Network is not only a tool, but also one of the important roles on advancing modern civilization. Two main reasons are that the speed of spread and the amount of data through computer networking are much faster and greater than traditional media. To utilize the portability of computer network, many servers have used web applications to assist or accomplish their services. Most of the web applications are developed by script languages, and thereby, these applications usually have high portability and compatibility. However, script language is a kind of dynamic language and thus incurs poor performance. Moreover, compare to desktop applications, web applications lack variety. These drawback will decrease the quantity and quality of service provided by servers. To enhance the performance and increase the variety of web applications, Google Inc. released a new project named Native Client (NaCl) in 2008, which is a sandboxing technology for running a native code on web browser. In 2010, Google released another project named Portable Native Client (PNaCl), which is an architecture-independent version of NaCl for higher portability. In this thesis, we integrate a binary translator and the PNaCl system for translating legacy x86 executables to web applications. In the meantime, the high portability and usability of web applications inspire us to develop a new profiling strategy to collect and analyze the profiling data from worldwide clients for improving the translation quality further. To accomplish our framework, we modify an existing binary translator, SBT86, integrate it with PNaCl system, and design a global profiling strategy. Implementations of this framework are divided into three parts. First, for enhancing the translation quality and portability of the translated code, we modify the translation functions and helper functions of SBT86. Second, for executing translated code on PNaCl system, we modify the interface between the host operation system and the translated code. Third, we design a Profiling-Data Manager for analyzing the big profiling data. Our experiments show that our modification of previous x86 binary translator reduces the size of the translated code of legacy x86 executable for 70% on average. At the meantime, we may collect memory-related profiling data and then improve our translated code further with lightweight overhead for each user. After that, our framework will utilize the profiling data to retranslate the executable with aggressive optimization. Finally, we can reduce the size of the translated code for 79% on average, and the emulation of the legacy x86 executable on NaCl system may lose only 50% performance comparing with execution time of the source executable on naitve platform.