收藏切换
LASM: Automatically Lift x86 Inline Assembly for Whole Program Analysis
收藏切换
Yuanming Lai1, 2, Zhe Wang1, 2, Chenggang Wu1, 2, Ding Yu3, Chengxuan Hou1, 2
Journal of Computer Research and Development | 2026, 63(5) : 1350 - 1375
Less
收藏切换
Journal of Computer Research and Development | 2026, 63(5): 1350-1375
• Software Technology •
LASM: Automatically Lift x86 Inline Assembly for Whole Program Analysis
Full
Yuanming Lai1, 2, Zhe Wang1, 2, Chenggang Wu1, 2, Ding Yu3, Chengxuan Hou1, 2
Affiliations
  • 1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190
  • 2University of Chinese Academy of Sciences, Beijing 100049
  • 3Beijing Horizon Robotics Technology Research and Development Co., Ltd, Beijing 100089
  • born in 1991. PhD. His main research interests include binary translation, computer systems security, and code obfuscation

    born in 1990. PhD, associate professor, master supervisor. Member of CCF. His main research interests include computer systems security, operating systems, and computer architecture

    born in 1969. PhD, professor, PhD supervisor. Distinguished member of CCF. His main research interests include binary translation, compiler optimization, and computer systems security. (wucg@ict. ac. cn)

    born in 1996. Master. His main research interests include software security and compiler optimization

    born in 1998. PhD candidate. His main research interests include operating system security and vitrualization technology. ()

About Author:

born in 1991. PhD. His main research interests include binary translation, computer systems security, and code obfuscation

born in 1990. PhD, associate professor, master supervisor. Member of CCF. His main research interests include computer systems security, operating systems, and computer architecture

born in 1969. PhD, professor, PhD supervisor. Distinguished member of CCF. His main research interests include binary translation, compiler optimization, and computer systems security. (wucg@ict. ac. cn)

born in 1996. Master. His main research interests include software security and compiler optimization

born in 1998. PhD candidate. His main research interests include operating system security and vitrualization technology. ()

Published: 2026-05-01 doi: 10.7544/issn1000-1239.202440881
Outline
收藏切换

Integrating C/C++ with assembly language is a common practice in software development, particularly in operating system-level software. However, programming with inline assembly can be more error-prone due to its complex architecture-related details and the lack of compiler checks. Modern software engineering employs static analysis to detect bugs and security vulnerabilities. Nevertheless, analyzing inline assembly poses challenges beyond the capabilities of LLVM IR-based static analysis tools. If the effects of inline assembly on data flow and control flow are not addressed effectively, the result can be a rise in false positives and a decline in precision. We present LASM, an innovative tool that can automatically lift x86 inline assembly code into LLVM IR and integrate it with the IR generated from compiling the C/C++ code. LASM enables downstream static analysis tools to perform whole program analysis on applications containing inline assembly code fragments, thereby reducing false positives and improving precision. It emulates hardware and the semantics of assembly instructions using LLVM IR. By providing optional optimizations that simplify the semantics of atomic instructions and enhance pointer arithmetic semantics, LASM supports static analysis tools more effectively. By completely and accurately emulating assembly instructions, the LLVM IR lifted by LASM can be compiled into an executable program. The strength of LASM lies in its ease of integration; LLVM IR-based static analysis tools can analyze inline assembly code by incorporating it seamlessly into their existing workflows without requiring additional modifications or adaptations to their implementations. LASM facilitates the reuse of many pre-existing tools in the ecosystem. Our experimental results indicate that LASM effectively supports SVF-based static analysis on the Linux kernel. This analysis systematically categorizes global variables based on whether their access occurs during the initialization or post-initialization phase. The results show an impressive 62.03% reduction in misclassifications and an 8.06 percentage point increase in precision. LASM helps to identify 14.80% more protectable variables without introducing new misclassifications. These results highlight LASM’s potential to enhance the effectiveness of static analysis in the presence of inline assembly code.

inline assembly  /  mixed C/C++ and assembly programming  /  assembly code lifting  /  semantics merging  /  static analysis  /  whole program analysis  /  LLVM IR
赖远明, 王喆, 武成岗, 于丁, 侯承轩. LASM:面向全程序分析的x86内嵌汇编代码自动提升. 计算机研究与发展, 2026 , 63 (5) : 1350 -1375 . DOI: 10.7544/issn1000-1239.202440881
Yuanming Lai, Zhe Wang, Chenggang Wu, Ding Yu, Chengxuan Hou. LASM: Automatically Lift x86 Inline Assembly for Whole Program Analysis[J]. Journal of Computer Research and Development, 2026 , 63 (5) : 1350 -1375 . DOI: 10.7544/issn1000-1239.202440881
Year 2026 volume 63 Issue 5
68
34
Cite this Article
BibTeX
Article Info
doi: 10.7544/issn1000-1239.202440881
  • Receive Date:2024-11-11
  • Online Date:2026-11-17
  • Published:2026-05-01
Article Data
Affiliations
History
  • Received:2024-11-11
  • Revised:2026-03-04
Affiliations
    1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190
    2University of Chinese Academy of Sciences, Beijing 100049
    3Beijing Horizon Robotics Technology Research and Development Co., Ltd, Beijing 100089
References
Share
https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/10.7544/issn1000-1239.202440881
Share to
QR

Scan QR to access full text

Cite this article
BibTeX
Citations
表12种不同金属材料的力学参数
科
Family
属数
Number of
genus
种数
Number of
species
占总种数比例
Percentage of
total species (%)
属
Genus
种数
Number of
species
占总种数比例
Percentage of total
species (%)
鹅膏菌科Amanitaceae 2 11 5.26 鹅膏菌属 Amanita 10 4.78
小菇科 Mycenaceae 2 12 5.74 丝盖伞属 Inocybe 5 2.39
多孔菌科 Polyporaceae 8 14 6.70 蜡蘑属 Laccaria 5 2.39
红菇科 Russulaceae 3 23 11.00 小皮伞属 Marasmius 6 2.87
小菇属 Mycena 11 5.26
光柄菇属 Pluteus 5 2.39
红菇属 Russula 17 8.13
栓菌属 Trametes 5 2.39
关闭全屏
  • BibTeX
  • EndNote
  • RefWorks
  • TxT