Article(id=1329419755095700480, tenantId=1146029695717560320, journalId=1324759914146529478, issueId=1329419577676641015, articleNumber=null, orderNo=null, doi=10.7544/issn1000-1239.202440881, pmid=null, cstr=null, oa=null, hot=null, price=null, onlineType=0, articleFormat=0, articleType=null, articleTypeStr=null, receivedDate=1731254400000, receivedDateStr=2024-11-11, revisedDate=1772553600000, revisedDateStr=2026-03-04, acceptedDate=null, acceptedDateStr=null, onlineDate=1794887969038, onlineDateStr=2026-11-17, pubDate=1777564800000, pubDateStr=2026-05-01, doiRegisterDate=null, doiRegisterDateStr=null, onlineIssueDate=1794887969038, onlineIssueDateStr=2026-11-17, onlineJustAcceptDate=null, onlineJustAcceptDateStr=null, onlineFirstDate=null, onlineFirstDateStr=null, sourceXml=null, magXml=null, createTime=1794887969038, creator=13701087609, updateTime=1794887969038, updator=13701087609, issue=Issue{id=1329419577676641015, tenantId=1146029695717560320, journalId=1324759914146529478, year='2026', volume='63', issue='5', pageStart='1095', pageEnd='1375', issueExtLink='null', onlineDate='null', pubDate='1777564800000', pubDateStr='2026-05-01', beforeIssueId=null, nextIssueId=null, price=null, status=1, issueComplete=1, articleOrder=1, issueType=-1, specialIssue=null, createTime=1794887926739, creator='13701087609', updateTime=1794887926739, updator='13701087609', preIssue=null, nextIssue=null, articleTotal=null, ext=null, issueFiles=null, downloadFileDto=null}, startPage=1350, endPage=1375, ext={EN=ArticleExt(id=1329419755263471616, articleId=1329419755095700480, tenantId=1146029695717560320, journalId=1324759914146529478, language=EN, title=LASM: Automatically Lift x86 Inline Assembly for Whole Program Analysis, columnId=1327010930744996407, journalTitle=Journal of Computer Research and Development, columnName=Software Technology, runingTitle=null, highlight=null, articleAbstract=

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.

, authors=Yuanming Lai1, 2, Zhe Wang1, 2, Chenggang Wu1, 2, Ding Yu3, Chengxuan Hou1, 2, authorsList=Yuanming Lai, Zhe Wang, Chenggang Wu, Ding Yu, Chengxuan Hou, authorCompany=null, correspAuthors=null, authorNote=

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. ()

, correspAuthorsNote=null, copyrightStatement=Copyright © 2026 Journal of Computer Research and Development. All rights reserved., copyrightOwner=null, extLink=null, articleAbsUrl=null, sourceXml=null, magXml=null, pdfUrl=null, pdf=null, pdfFileSize=null, pdfExtLink=null, richHtmlUrl=null, mobilePdfUrl=null, reviewReport=null, pdfFirstPage=null, abstractGraph=null, abstractGraphContent=null, abstractVideo=null, citation=null, cebUrl=null, magXmlContent=null, mapNumber=null, fund=null), CN=ArticleExt(id=1329419759453581359, articleId=1329419755095700480, tenantId=1146029695717560320, journalId=1324759914146529478, language=CN, title=LASM:面向全程序分析的x86内嵌汇编代码自动提升, columnId=1327010930908574265, journalTitle=计算机研究与发展, columnName=软件技术, runingTitle=null, highlight=null, articleAbstract=

C/C++和汇编语言混合编程在软件开发中被广泛使用。汇编语言的复杂性让混合编程容易出错。静态程序分析工具能减少软件漏洞,提高其鲁棒性。但基于LLVM IR开发的静态程序分析工具无法分析程序中的内嵌汇编代码。内嵌汇编代码影响程序中的数据流和控制流。静态分析工具忽略汇编代码导致程序中部分数据流未被纳入到分析中,使得误报率增加,准确率降低。设计并实现了LASM系统,该系统能将C/C++代码中的x86内嵌汇编代码自动提升成LLVM IR,并与编译C/C++得到的中间表示(IR)相融合,让下游的静态程序分析工具能对程序的所有代码进行全程序分析,降低误报率,提高准确率。LASM通过模拟硬件执行环境并使用LLVM IR的指令模拟汇编指令的语义,实现了汇编代码到LLVM IR的提升,并针对静态分析提供了原子指令语义简化和指针运算指令语义提升的优化。LASM能正确完整地模拟汇编指令的语义,提升汇编代码得到的LLVM IR代码在编译链接成可执行文件后可以正确运行。同时,LASM能和下游基于LLVM IR的静态程序分析工具无缝衔接,不需要任何适配即可增强工具的分析效果,达到复用和增强大量已有分析工具的目标。实验表明,LASM能支持针对Linux kernel的静态程序分析。在基于SVF分析Linux kernel对其全局变量的访问,并基于访问发生在初始化阶段还是初始化后阶段对变量进行分类的实验中,LASM的支持使分析精度提高了8.06个百分点,错误分类的变量数量下降了62.03%,在没有引入新分类错误的情况下多找到了14.80%的可保护变量。

, authors=赖远明1, 2, 王喆1, 2, 武成岗1, 2, 于丁3, 侯承轩1, 2, authorsList=赖远明, 王喆, 武成岗, 于丁, 侯承轩, authorCompany=null, correspAuthors=null, authorNote=

作者贡献声明

赖远明是论文工作的主要完成人,负责设计与实现LASM系统,设计并实施了实验,分析实验结果,撰写和修改论文;王喆对系统设计提出了建议并修改论文;武成岗为论文撰写提供了建议和指导;于丁参与了部分汇编指令语义模拟函数的实现;侯承轩参与了面向静态分析优化的实现。

1991年生。博士。主要研究方向为二进制翻译、计算机系统安全、代码混淆

1990年生。博士,副研究员,硕士生导师。CCF会员。主要研究方向为计算机系统安全、操作系统、体系结构

1969年生。博士,研究员,博士生导师。CCF杰出会员。主要研究领域为二进制翻译、编译优化、计算机系统安全

1996年生。硕士。主要研究方向为软件安全、编译优化

1998年生。博士研究生。主要研究方向为操作系统安全、虚拟化技术

, correspAuthorsNote=null, copyrightStatement=版权所有 © 2026 计算机研究与发展编辑部, copyrightOwner=null, extLink=null, articleAbsUrl=null, sourceXml=ody/N/MWMkNxxJP+QfLvRQ==, magXml=1/nh1WFBYbuTdJ6ZUojjeg==, pdfUrl=null, pdf=J84emfiaIf/ITWyNWQJUPA==, pdfFileSize=1883921, pdfExtLink=null, richHtmlUrl=null, mobilePdfUrl=null, reviewReport=null, pdfFirstPage=null, abstractGraph=L/dByS04BQ3966X5l9Njzg==, abstractGraphContent=null, abstractVideo=null, citation=null, cebUrl=null, magXmlContent=2+YZGubLGf52Ij53zvMPRg==, mapNumber=null, fund=null)}, authors=[Author(id=1329419759998840890, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, orderNo=0, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=laiyuanming@ict.ac.cn, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419760082726973, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419759998840890, language=EN, stringName=Yuanming Lai, firstName=Yuanming, middleName=null, lastName=Lai, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, address=1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190
2University of Chinese Academy of Sciences, Beijing 100049, bio={"content":"

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

"}, bioImg=null, bioContent=

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

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419760145641534, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419759998840890, language=CN, stringName=赖远明, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, address=1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190
2中国科学院大学 北京 100049, bio={"img":"SOv+jRxCuT8wWWhoMKnapA==","content":"

1991年生。博士。主要研究方向为二进制翻译、计算机系统安全、代码混淆

"}, bioImg=SOv+jRxCuT8wWWhoMKnapA==, bioContent=

1991年生。博士。主要研究方向为二进制翻译、计算机系统安全、代码混淆

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419759730405424, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=1, ext=[AuthorCompanyExt(id=1329419759747182641, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759730405424, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190), AuthorCompanyExt(id=1329419759755571250, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759730405424, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190)]), AuthorCompany(id=1329419759847845939, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=2, ext=[AuthorCompanyExt(id=1329419759856234548, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759847845939, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2University of Chinese Academy of Sciences, Beijing 100049), AuthorCompanyExt(id=1329419759860428853, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759847845939, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2中国科学院大学 北京 100049)])]), Author(id=1329419760233721920, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, orderNo=1, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419760317608003, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419760233721920, language=EN, stringName=Zhe Wang, firstName=Zhe, middleName=null, lastName=Wang, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, address=1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190
2University of Chinese Academy of Sciences, Beijing 100049, bio={"content":"

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

"}, bioImg=null, bioContent=

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

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419760384716868, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419760233721920, language=CN, stringName=王喆, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, address=1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190
2中国科学院大学 北京 100049, bio={"img":"egBsTxyRBOD9X9zpDPcK2w==","content":"

1990年生。博士,副研究员,硕士生导师。CCF会员。主要研究方向为计算机系统安全、操作系统、体系结构

"}, bioImg=egBsTxyRBOD9X9zpDPcK2w==, bioContent=

1990年生。博士,副研究员,硕士生导师。CCF会员。主要研究方向为计算机系统安全、操作系统、体系结构

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419759730405424, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=1, ext=[AuthorCompanyExt(id=1329419759747182641, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759730405424, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190), AuthorCompanyExt(id=1329419759755571250, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759730405424, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190)]), AuthorCompany(id=1329419759847845939, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=2, ext=[AuthorCompanyExt(id=1329419759856234548, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759847845939, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2University of Chinese Academy of Sciences, Beijing 100049), AuthorCompanyExt(id=1329419759860428853, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759847845939, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2中国科学院大学 北京 100049)])]), Author(id=1329419760456020038, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, orderNo=2, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419760535711817, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419760456020038, language=EN, stringName=Chenggang Wu, firstName=Chenggang, middleName=null, lastName=Wu, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, address=1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190
2University of Chinese Academy of Sciences, Beijing 100049, bio={"content":"

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)

"}, bioImg=null, bioContent=

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)

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419760611209290, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419760456020038, language=CN, stringName=武成岗, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, address=1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190
2中国科学院大学 北京 100049, bio={"img":"RDiUCAQkvOk6tpH04i93rw==","content":"

1969年生。博士,研究员,博士生导师。CCF杰出会员。主要研究领域为二进制翻译、编译优化、计算机系统安全

"}, bioImg=RDiUCAQkvOk6tpH04i93rw==, bioContent=

1969年生。博士,研究员,博士生导师。CCF杰出会员。主要研究领域为二进制翻译、编译优化、计算机系统安全

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419759730405424, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=1, ext=[AuthorCompanyExt(id=1329419759747182641, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759730405424, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190), AuthorCompanyExt(id=1329419759755571250, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759730405424, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190)]), AuthorCompany(id=1329419759847845939, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=2, ext=[AuthorCompanyExt(id=1329419759856234548, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759847845939, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2University of Chinese Academy of Sciences, Beijing 100049), AuthorCompanyExt(id=1329419759860428853, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759847845939, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2中国科学院大学 北京 100049)])]), Author(id=1329419760669929548, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, orderNo=3, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419760737038414, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419760669929548, language=EN, stringName=Ding Yu, firstName=Ding, middleName=null, lastName=Yu, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=3, address=3Beijing Horizon Robotics Technology Research and Development Co., Ltd, Beijing 100089, bio={"content":"

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

"}, bioImg=null, bioContent=

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

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419760808341583, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419760669929548, language=CN, stringName=于丁, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=3, address=3北京地平线机器人技术研发有限公司 北京 100089, bio={"img":"jrEFIgJhs7IUnk8oHUI6eA==","content":"

1996年生。硕士。主要研究方向为软件安全、编译优化

"}, bioImg=jrEFIgJhs7IUnk8oHUI6eA==, bioContent=

1996年生。硕士。主要研究方向为软件安全、编译优化

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419759927537718, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=3, ext=[AuthorCompanyExt(id=1329419759935926327, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759927537718, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=3Beijing Horizon Robotics Technology Research and Development Co., Ltd, Beijing 100089), AuthorCompanyExt(id=1329419759944314936, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759927537718, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=3北京地平线机器人技术研发有限公司 北京 100089)])]), Author(id=1329419760879644753, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, orderNo=4, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=houchengxuan16@mails.ucas.ac.cn, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419760946753620, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419760879644753, language=EN, stringName=Chengxuan Hou, firstName=Chengxuan, middleName=null, lastName=Hou, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, address=1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190
2University of Chinese Academy of Sciences, Beijing 100049, bio={"content":"

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

"}, bioImg=null, bioContent=

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

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419761001279573, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419760879644753, language=CN, stringName=侯承轩, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, address=1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190
2中国科学院大学 北京 100049, bio={"img":"g8a0HihroPMBpOnvmGQJTw==","content":"

1998年生。博士研究生。主要研究方向为操作系统安全、虚拟化技术

"}, bioImg=g8a0HihroPMBpOnvmGQJTw==, bioContent=

1998年生。博士研究生。主要研究方向为操作系统安全、虚拟化技术

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419759730405424, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=1, ext=[AuthorCompanyExt(id=1329419759747182641, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759730405424, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190), AuthorCompanyExt(id=1329419759755571250, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759730405424, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190)]), AuthorCompany(id=1329419759847845939, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=2, ext=[AuthorCompanyExt(id=1329419759856234548, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759847845939, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2University of Chinese Academy of Sciences, Beijing 100049), AuthorCompanyExt(id=1329419759860428853, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759847845939, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2中国科学院大学 北京 100049)])])], keywords=[Keyword(id=1329419761118720087, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, orderNo=1, keyword=inline assembly), Keyword(id=1329419761177440344, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, orderNo=2, keyword=mixed C/C++ and assembly programming), Keyword(id=1329419761244549209, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, orderNo=3, keyword=assembly code lifting), Keyword(id=1329419761307463770, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, orderNo=4, keyword=semantics merging), Keyword(id=1329419761361989723, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, orderNo=5, keyword=static analysis), Keyword(id=1329419761420709980, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, orderNo=6, keyword=whole program analysis), Keyword(id=1329419761487818845, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, orderNo=7, keyword=LLVM IR), Keyword(id=1329419761584287838, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, orderNo=1, keyword=内嵌汇编), Keyword(id=1329419761659785311, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, orderNo=2, keyword=C/C++与汇编混合编程), Keyword(id=1329419761735282784, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, orderNo=3, keyword=汇编代码提升), Keyword(id=1329419761802391649, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, orderNo=4, keyword=语义融合), Keyword(id=1329419761915637858, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, orderNo=5, keyword=静态分析), Keyword(id=1329419761986941027, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, orderNo=6, keyword=全程序分析), Keyword(id=1329419762070827108, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, orderNo=7, keyword=LLVM中间表示)], refs=[Reference(id=1329419766126719131, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=1, rfOrder=0, authorNames=null, journalName=null, refType=null, unstructuredReference=Anguiano R. Linux kernel mainline 4.9 sloccount. txt [EB/OL]. (2016-12-12)[2024-10-16]. https://gist.github.com/ricardoanguiano/18125b7eb3f26cf83724fb60662bdd2c, articleTitle=null, refAbstract=null), Reference(id=1329419766214799516, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=2, rfOrder=1, authorNames=null, journalName=null, refType=null, unstructuredReference=OpenMathLib. OpenBLAS [EB/OL]. [2024-10-16]. https://github.com/OpenMathLib/OpenBLAS, articleTitle=null, refAbstract=null), Reference(id=1329419766307074205, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=3, rfOrder=2, authorNames=null, journalName=null, refType=null, unstructuredReference=Recoules F, Bardin S, Bonichon R, et al. Get rid of inline assembly through verification-oriented lifting[C]//Proc of the 34th IEEE/ACM Int Conf on Automated Software Engineering (ASE’19). Piscataway, NJ: IEEE, 2019: 577−589, articleTitle=null, refAbstract=null), Reference(id=1329419766365794462, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=4, rfOrder=3, authorNames=null, journalName=null, refType=null, unstructuredReference=Rigger M, Marr S, Kell S, et al. An analysis of x86−64 inline assembly in C programs[C]//Proc of the 14th ACM SIGPLAN/SIGOPS Int Conf on Virtual Execution Environments. New York: ACM, 2018: 84−99, articleTitle=null, refAbstract=null), Reference(id=1329419766445486239, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=5, rfOrder=4, authorNames=null, journalName=null, refType=null, unstructuredReference=Larabel M. Linus Torvalds takes on a performance patch: "I relax by playing with inline assembly" [EB/OL]. (2023-06-27)[2024-10-16]. https://www.phoronix.com/news/Linus-Torvalds-Relax-Inline-ASM, articleTitle=null, refAbstract=null), Reference(id=1329419766504206496, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=6, rfOrder=5, authorNames=null, journalName=null, refType=null, unstructuredReference=Petkov B. [Git pull] x86/misc for 6. 5 [EB/OL]. (2023-06-27)[2024-10-16]. https://lore.kernel.org/lkml/fe807f09-9e4a-52d6-c057-b159bee55510@linux.intel.com/T/, articleTitle=null, refAbstract=null), Reference(id=1329419766592286881, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=7, rfOrder=6, authorNames=null, journalName=null, refType=null, unstructuredReference=Biesheuvel A. [Patch v2] ARM: Avoid literal references in inline assembly [EB/OL]. (2021-12-22)[2024-10-16]. https://lore.kernel.org/linux-arm-kernel/YcN4xJfH5NaPSibU@archlinux-ax161/T/, articleTitle=null, refAbstract=null), Reference(id=1329419766718116002, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=8, rfOrder=7, authorNames=null, journalName=null, refType=null, unstructuredReference=Thomson P. Static analysis: An introduction: The fundamental challenge of software engineering is one of complexity[J]. Queue, 2021, 19(4): 1−13, articleTitle=null, refAbstract=null), Reference(id=1329419766789419171, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=9, rfOrder=8, authorNames=null, journalName=null, refType=null, unstructuredReference=National Aeronautics and Space Administration (NASA). Software engineering and assurance handbook[EB/OL]. [2024-10-16]. https://swehb.nasa.gov/display/SWEHBVC, articleTitle=null, refAbstract=null), Reference(id=1329419766860722340, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=10, rfOrder=9, authorNames=null, journalName=null, refType=null, unstructuredReference=Nichols Jr W R. The cost and benefits of static analysis during development[J]. arXiv preprint, arXiv: 2003.03001, 2020, articleTitle=null, refAbstract=null), Reference(id=1329419766923636901, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=11, rfOrder=10, authorNames=null, journalName=null, refType=null, unstructuredReference=Lattner C, Adve V. LLVM: A compilation framework for lifelong program analysis & transformation[C]//Proc of the 2nd Int Symp on Code Generation and Optimization(CGO 2004). Piscataway, NJ: IEEE, 2004: 75−86, articleTitle=null, refAbstract=null), Reference(id=1329419767011717286, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=12, rfOrder=11, authorNames=null, journalName=null, refType=null, unstructuredReference=Sui Yulei, Xue Jingling. SVF: Interprocedural static value-flow analysis in LLVM[C]//Proc of the 25th Int Conf on Compiler Construction. New York: ACM, 2016: 265−266, articleTitle=null, refAbstract=null), Reference(id=1329419767091409063, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=13, rfOrder=12, authorNames=null, journalName=null, refType=null, unstructuredReference=李广威, 袁挺, 李炼. 开源 CC++ 静态软件缺陷检测工具实证研究[J]. 软件学报, 2022, 33(6): 2061−2081, articleTitle=null, refAbstract=null), Reference(id=1329419767179489448, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=13, rfOrder=13, authorNames=null, journalName=null, refType=null, unstructuredReference=Li Guangwei, Yuan Ting, Li Lian. Study of state-of-the-art open-source C/C++ static analysis tools[J]. Journal of Software, 2022, 33(6): 2061−2081 (in Chinese), articleTitle=null, refAbstract=null), Reference(id=1329419767242404009, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=14, rfOrder=14, authorNames=null, journalName=null, refType=null, unstructuredReference=Lu Kangjie, Pakki A, Wu Qiushi. Detecting missing-check bugs via semantic-and context-aware criticalness and constraints inferences[C]//Proc of the 28th USENIX Security Symp (USENIX Security 19). Berkeley, CA : USENIX Association, 2019: 1769−1786, articleTitle=null, refAbstract=null), Reference(id=1329419767317901482, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=15, rfOrder=15, authorNames=null, journalName=null, refType=null, unstructuredReference=Wang Wenwen, Lu Kangjie, Yew Pen-Chung. Check it again: Detecting lacking-recheck bugs in OS kernels[C]//Proc of the 25th ACM SIGSAC Conf on Computer and Communications Security. New York: ACM, 2018: 1899−1913, articleTitle=null, refAbstract=null), Reference(id=1329419767380816043, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=16, rfOrder=16, authorNames=null, journalName=null, refType=null, unstructuredReference=Liu Dinghao, Wu Qiushi, Ji Shouling, et al. Detecting missed security operations through differential checking of object-based similar paths[C]//Proc of the 28th ACM SIGSAC Conf on Computer and Communications Security. New York: ACM, 2021: 1627−1644, articleTitle=null, refAbstract=null), Reference(id=1329419767439536300, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=17, rfOrder=17, authorNames=null, journalName=null, refType=null, unstructuredReference=Wu Qiushi, Pakki A, Emamdoost N, et al. Understanding and detecting disordered error handling with precise function pairing[C]//Proc of the 30th USENIX Security Symp (USENIX Security 21). Berkeley, CA: USENIX Association, 2021: 2041−2058, articleTitle=null, refAbstract=null), Reference(id=1329419767502450861, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=18, rfOrder=18, authorNames=null, journalName=null, refType=null, unstructuredReference=Cifuentes C, Gauthier F, Hassanshahi B, et al. The role of program analysis in security vulnerability detection: Then and now[J]. Computers & Security, 2023, 135: 1−14, articleTitle=null, refAbstract=null), Reference(id=1329419767569559726, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=19, rfOrder=19, authorNames=null, journalName=null, refType=null, unstructuredReference=Bessey A, Block K, Chelf B, et al. A few billion lines of code later: Using static analysis to find bugs in the real world[J]. Communications of the ACM, 2010, 53(2): 66−75, articleTitle=null, refAbstract=null), Reference(id=1329419767636668591, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=20, rfOrder=20, authorNames=null, journalName=null, refType=null, unstructuredReference=Machiry A, Spensky C, Corina J, et al. Dr. Checker: A soundy analysis for Linux kernel drivers[C]// Proc of the 26th USENIX Security Symp (USENIX Security 17). Berkeley, CA : USENIX Association, 2017: 1007−1024, articleTitle=null, refAbstract=null), Reference(id=1329419767779274928, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=21, rfOrder=21, authorNames=null, journalName=null, refType=null, unstructuredReference=SVF-tools. Test-Suite [EB/OL]. [2024-10-16]. https://github.com/SVF-tools/Test-Suite, articleTitle=null, refAbstract=null), Reference(id=1329419767846383793, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=22, rfOrder=22, authorNames=null, journalName=null, refType=null, unstructuredReference=Sui Yulei, Ye Ding, Xue Jingling. Static memory leak detection using full-sparse value-flow analysis[C]//Proc of the 21st Int Symp on Software Testing and Analysis (ISSTA 2012). New York: ACM, 2012: 254−264, articleTitle=null, refAbstract=null), Reference(id=1329419767917686962, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=23, rfOrder=23, authorNames=null, journalName=null, refType=null, unstructuredReference=LLVM-admin Team. The LLVM compiler infrastructure [EB/OL]. [2024-10-16]. https://llvm.org/, articleTitle=null, refAbstract=null), Reference(id=1329419767984795827, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=24, rfOrder=24, authorNames=null, journalName=null, refType=null, unstructuredReference=Sattler F, Böhm S, Schubert P D, et al. SEAL: Integrating program analysis and repository mining[J]. ACM Transactions on Software Engineering and Methodology, 2023, 32(5): 121: 1−121: 34, articleTitle=null, refAbstract=null), Reference(id=1329419768068681908, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=25, rfOrder=25, authorNames=null, journalName=null, refType=null, unstructuredReference=Schubert P D, Hermann B, Bodden E. Lossless, persisted summarization of static callgraph, points-to and data-flow analysis[C]//Proc of the 35th European Conf on Object-Oriented Programming (ECOOP 2021). Dagstuhl, Germany: Schloss Dagstuhl -- Leibniz Zentrum für Informatik, 2021: 2: 1−2: 31, articleTitle=null, refAbstract=null), Reference(id=1329419768127402165, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=26, rfOrder=26, authorNames=null, journalName=null, refType=null, unstructuredReference=Wohlferd D. Reasons you should not use inline asm [EB/OL]. (2016-04-26)[2024-10-16]. https://gcc.gnu.org/wiki/DontUseInlineAsm, articleTitle=null, refAbstract=null), Reference(id=1329419768186122422, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=27, rfOrder=27, authorNames=null, journalName=null, refType=null, unstructuredReference=CVEdetails. com. Vulnerability details: CVE−2024−26706 [EB/OL]. [2024-10-16]. https://www.cvedetails.com/cve/CVE-2024-26706/, articleTitle=null, refAbstract=null), Reference(id=1329419768270008503, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=28, rfOrder=28, authorNames=null, journalName=null, refType=null, unstructuredReference=CVEdetails. com. Vulnerability details: CVE−2023−52874 [EB/OL]. [2024-10-16]. https://www.cvedetails.com/cve/CVE-2023-52874/, articleTitle=null, refAbstract=null), Reference(id=1329419768337117369, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=29, rfOrder=29, authorNames=null, journalName=null, refType=null, unstructuredReference=Recoules F, Bardin S, Bonichon R, et al. Interface compliance of inline assembly: Automatically check, patch and refine[C]//Proc of the 43rd IEEE/ACM Int Conf on Software Engineering (ICSE). Piscataway, NJ: IEEE, 2021: 1236−1247, articleTitle=null, refAbstract=null), Reference(id=1329419768412614842, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=30, rfOrder=30, authorNames=null, journalName=null, refType=null, unstructuredReference=The LLVM Organization. LLVM-test-suite [EB/OL]. [2024-10-16]. https://github.com/llvm/llvm-test-suite, articleTitle=null, refAbstract=null), Reference(id=1329419768471335099, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=31, rfOrder=31, authorNames=null, journalName=null, refType=null, unstructuredReference=The Standard Performance Evaluation Corporation (SPEC). SPEC CPU 2006 [EB/OL]. [2024-10-16]. https://www.spec.org/cpu2006/, articleTitle=null, refAbstract=null), Reference(id=1329419768530055356, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=32, rfOrder=32, authorNames=null, journalName=null, refType=null, unstructuredReference=Avast. RetDec [EB/OL]. [2024-10-16]. https://github.com/avast/RetDec, articleTitle=null, refAbstract=null), Reference(id=1329419768588775613, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=33, rfOrder=33, authorNames=null, journalName=null, refType=null, unstructuredReference=Yadavalli S B, Smith A. Raising binaries to LLVM IR with MCTOLL (WIP paper)[C]//Proc of the 20th ACM SIGPLAN/SIGBED Int Conf on Languages, Compilers, and Tools for Embedded Systems. New York: ACM, 2019: 213−218, articleTitle=null, refAbstract=null), Reference(id=1329419768639107262, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=34, rfOrder=34, authorNames=null, journalName=null, refType=null, unstructuredReference=Liu Zhibo, Yuan Yuanyuan, Wang Shuai, et al. Sok: Demystifying binary lifters through the lens of downstream applications[C]//Proc of the 43rd IEEE Symp on Security and Privacy (SP). Piscataway, NJ: IEEE, 2022: 1100−1119, articleTitle=null, refAbstract=null), Reference(id=1329419768693633215, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=35, rfOrder=35, authorNames=null, journalName=null, refType=null, unstructuredReference=Li Guoren, Zhang Hang, Zhou Jinmeng, et al. A hybrid alias analysis and its application to global variable protection in the Linux kernel[C]//Proc of the 32nd USENIX Security Symp (USENIX Security 23). Berkeley, CA: USENIX Association, 2023: 4211−4228, articleTitle=null, refAbstract=null), Reference(id=1329419768756547776, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=36, rfOrder=36, authorNames=null, journalName=null, refType=null, unstructuredReference=Cook K. Introduce post-init read-only memory [EB/OL]. [2024-10-16]. https://lwn.net/Articles/676145/, articleTitle=null, refAbstract=null), Reference(id=1329419768811073729, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=37, rfOrder=37, authorNames=null, journalName=null, refType=null, unstructuredReference=Petch M. Calling printf in extended inline ASM [EB/OL]. [2025-02-25]. https://stackoverflow.com/questions/37502841/calling-printf-in-extended-inline-asm/37503773#37503773, articleTitle=null, refAbstract=null), Reference(id=1329419768869793986, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=38, rfOrder=38, authorNames=null, journalName=null, refType=null, unstructuredReference=Travitch. whole-program-LLVM [EB/OL]. [2024-10-16]. https://github.com/travitch/whole-program-llvm, articleTitle=null, refAbstract=null), Reference(id=1329419768924319939, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=39, rfOrder=39, authorNames=null, journalName=null, refType=null, unstructuredReference=Verifysoft Technology. CodeSonar―Static code analysis [EB/OL]. [2025-02-25]. https://www.verifysoft.com/en_codesonar.html, articleTitle=null, refAbstract=null), Reference(id=1329419769008206020, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=40, rfOrder=40, authorNames=null, journalName=null, refType=null, unstructuredReference=Quinlan D, Vuduc R, Panas T, et al. Support for whole-program analysis and the verification of the one-definition rule in C++[R]. Livermore, CA: Lawrence Livermore National Lab, 2006, articleTitle=null, refAbstract=null), Reference(id=1329419769071120581, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=41, rfOrder=41, authorNames=null, journalName=null, refType=null, unstructuredReference=Dietrich J, Gauthier F, Krishnan P. Driver generation for Java EE web applications[C]//Proc of the 25th Australasian Software Engineering Conf (ASWEC). Piscataway, NJ: IEEE, 2018: 121−125, articleTitle=null, refAbstract=null), Reference(id=1329419769129840838, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=42, rfOrder=42, authorNames=null, journalName=null, refType=null, unstructuredReference=Arzt S, Rasthofer S, Fritz C, et al. Flowdroid: Precise context, flow, field, object-sensitive and lifecycle-aware taint analysis for Android apps[J]. ACM SIGPLAN Notices, 2014, 49(6): 259−269, articleTitle=null, refAbstract=null), Reference(id=1329419769188561095, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=43, rfOrder=43, authorNames=null, journalName=null, refType=null, unstructuredReference=Blackshear S, Gendreau A, Chang B Y E. Droidel: A general approach to Android framework modeling[C]//Proc of the 4th ACM SIGPLAN Int Workshop on State of the Art in Program Analysis. New York: ACM, 2015: 19−25, articleTitle=null, refAbstract=null), Reference(id=1329419769259864264, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=44, rfOrder=44, authorNames=null, journalName=null, refType=null, unstructuredReference=Chen Miao, Tu Tengfei, Zhang Hua, et al. Jasmine: A static analysis framework for spring core technologies[C]//Proc of the 37th IEEE/ACM Int Conf on Automated Software Engineering. Piscataway, NJ: IEEE, 2022: 1−13, articleTitle=null, refAbstract=null), Reference(id=1329419769318584521, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=45, rfOrder=45, authorNames=null, journalName=null, refType=null, unstructuredReference=Laursen M R, Xu Wenyuan, Møller A. Reducing static analysis unsoundness with approximate interpretation[C]//Proc of the 45th ACM on Programming Languages(PLDI). New York: ACM, 2024: 1165−1188, articleTitle=null, refAbstract=null), Reference(id=1329419769377304778, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=46, rfOrder=46, authorNames=null, journalName=null, refType=null, unstructuredReference=Hardekopf B, Lin C. The ant and the grasshopper: Fast and accurate pointer analysis for millions of lines of code[C]//Proc of the 28th ACM SIGPLAN Conf on Programming Language Design and Implementation. New York: ACM, 2007: 290−299, articleTitle=null, refAbstract=null), Reference(id=1329419769436025035, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=47, rfOrder=47, authorNames=null, journalName=null, refType=null, unstructuredReference=Hardekopf B, Lin C. Flow-sensitive pointer analysis for millions of lines of code[C]//Proc of the 9th Int Symp on Code Generation and Optimization (CGO 2011). Piscataway, NJ: IEEE, 2011: 289−298, articleTitle=null, refAbstract=null), Reference(id=1329419769507328204, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=48, rfOrder=48, authorNames=null, journalName=null, refType=null, unstructuredReference=Yu Hongtao, Xue Jingling, Huo Wei, et al. Level by level: Making flow-and context-sensitive pointer analysis scalable for millions of lines of code[C]//Proc of the 8th annual IEEE/ACM Int Symp on Code Generation and Optimization. Piscataway, NJ: IEEE, 2010: 218−229, articleTitle=null, refAbstract=null), Reference(id=1329419769561854157, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=49, rfOrder=49, authorNames=null, journalName=null, refType=null, unstructuredReference=McPeak S, Gros C H, Ramanathan M K. Scalable and incremental software bug detection[C]//Proc of the 9th Joint Meeting on Foundations of Software Engineering (ESEC/FSE 2013). New York: ACM, 2013: 554−564, articleTitle=null, refAbstract=null), Reference(id=1329419769628963022, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=50, rfOrder=50, authorNames=null, journalName=null, refType=null, unstructuredReference=Garbervetsky D, Zoppi E, Livshits B. Toward full elasticity in distributed static analysis: The case of callgraph analysis[C]//Proc of the 11th Joint Meeting on Foundations of Software Engineering (ESEC/FSE 2017). New York: ACM, 2017: 442−453, articleTitle=null, refAbstract=null), Reference(id=1329419769691877583, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=51, rfOrder=51, authorNames=null, journalName=null, refType=null, unstructuredReference=Gens D, Schmitt S, Davi L, et al. K-Miner: Uncovering memory corruption in Linux[C]//Proc of the 25th Annual Network and Distributed System Security Symp (NDSS). Reston, VA: The Internet Society, 2018: 1−15, articleTitle=null, refAbstract=null), Reference(id=1329419769754792144, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=52, rfOrder=52, authorNames=null, journalName=null, refType=null, unstructuredReference=Corteggiani N, Camurati G, Francillon A. Inception: System-wide security testing of real-world embedded systems software[C]//Proc of the 27th USENIX Security Symp (USENIX Security 18). Berkeley, CA: USENIX Association, 2018: 309−326, articleTitle=null, refAbstract=null), Reference(id=1329419769817706705, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=53, rfOrder=53, authorNames=null, journalName=null, refType=null, unstructuredReference=Yang Yuting, Tu Jinjing, Shen Wenbo, et al. kCPA: Towards sensitive pointer full life cycle authentication for OS kernels[J]. IEEE Transactions on Dependable and Secure Computing, 2023, 21(4): 3768−3784, articleTitle=null, refAbstract=null), Reference(id=1329419769880621266, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=54, rfOrder=54, authorNames=null, journalName=null, refType=null, unstructuredReference=Cifuentes C. Reverse Compilation Techniques[M]. Brisbane: Queensland University of Technology, 1994, articleTitle=null, refAbstract=null), Reference(id=1329419769943535827, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=55, rfOrder=55, authorNames=null, journalName=null, refType=null, unstructuredReference=Cifuentes C, Gough K J. Decompilation of binary programs[J]. Software: Practice and Experience, 1995, 25(7): 811−829, articleTitle=null, refAbstract=null), Reference(id=1329419770014838996, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=56, rfOrder=56, authorNames=null, journalName=null, refType=null, unstructuredReference=Cifuentes C. Structuring decompiled graphs[C]//Proc of the 6th Int Conf on Compiler Construction. Berlin: Springer, 1996: 91−105, articleTitle=null, refAbstract=null), Reference(id=1329419770090336469, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=57, rfOrder=57, authorNames=null, journalName=null, refType=null, unstructuredReference=Hex-rays. Hex-rays decompiler[EB/OL]. [2024-10-16]. https://www.hex-rays.com/products/decompiler/, articleTitle=null, refAbstract=null), Reference(id=1329419770161639638, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=58, rfOrder=58, authorNames=null, journalName=null, refType=null, unstructuredReference=Hex-rays. Ida pro [EB/OL]. [2024-10-16]. https://www.hex-rays.com/products/ida/, articleTitle=null, refAbstract=null), Reference(id=1329419770232942807, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=59, rfOrder=59, authorNames=null, journalName=null, refType=null, unstructuredReference=Yakdan K, Eschweiler S, Gerhards-Padilla E, et al. No more gotos: Decompilation using pattern-independent control-flow structuring and semantic-preserving transformations[C]//Proc of the 22nd Annual Network and Distributed System Security Symp (NDSS). Reston, VA: The Internet Society, 2015: 1−15, articleTitle=null, refAbstract=null), Reference(id=1329419770304245976, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=60, rfOrder=60, authorNames=null, journalName=null, refType=null, unstructuredReference=NationalSecurityAgency. Ghidra [EB/OL]. [2024-10-16]. https://github.com/NationalSecurityAgency/ghidra, articleTitle=null, refAbstract=null), Reference(id=1329419770388132057, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=61, rfOrder=61, authorNames=null, journalName=null, refType=null, unstructuredReference=Toor T S. Decompilation of binaries into LLVM IR for automated analysis[D]. Waterloo: University of Waterloo, 2022, articleTitle=null, refAbstract=null), Reference(id=1329419770455240922, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=62, rfOrder=62, authorNames=null, journalName=null, refType=null, unstructuredReference=Yakdan K, Dechand S, Gerhards-Padilla E, et al. Helping johnny to analyze malware: A usability-optimized decompiler and malware analysis user study[C]//Proc of the 37th IEEE Symp on Security and Privacy (SP). Piscataway, NJ: IEEE, 2016: 158−177, articleTitle=null, refAbstract=null), Reference(id=1329419770539127003, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=63, rfOrder=63, authorNames=null, journalName=null, refType=null, unstructuredReference=Schwartz E J, Lee J H, Woo M et al. Native x86 decompilation using semantics-preserving structural analysis and iterative control-flow structuring[C]//Proc of the 22nd USENIX Security Symp (USENIX Security 13). Berkeley, CA: USENIX Association, 2013: 353−368, articleTitle=null, refAbstract=null), Reference(id=1329419770602041564, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=64, rfOrder=64, authorNames=null, journalName=null, refType=null, unstructuredReference=Liu Zhibo, Wang Shuai. How far we have come: Testing decompilation correctness of C decompilers[C]//Proc of the 29th ACM SIGSOFT Int Symp on Software Testing and Analysis (ISSTA 2020). New York: ACM, 2020: 475−487, articleTitle=null, refAbstract=null), Reference(id=1329419770664956125, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=65, rfOrder=65, authorNames=null, journalName=null, refType=null, unstructuredReference=lifting-bits. Remill [EB/OL]. [2024-10-16]. https://github.com/lifting-bits/remill, articleTitle=null, refAbstract=null), Reference(id=1329419770723676382, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=66, rfOrder=66, authorNames=null, journalName=null, refType=null, unstructuredReference=lifting-bits. McSema [EB/OL]. [2024-10-16]. https://github.com/lifting-bits/mcsema, articleTitle=null, refAbstract=null), Reference(id=1329419770782396639, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=67, rfOrder=67, authorNames=null, journalName=null, refType=null, unstructuredReference=cojocar. Bin2llvm [EB/OL]. [2024-10-16]. https://github.com/cojocar/bin2llvm, articleTitle=null, refAbstract=null), Reference(id=1329419770883059936, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=68, rfOrder=68, authorNames=null, journalName=null, refType=null, unstructuredReference=Altinay A, Nash J, Kroes T, et al. BinRec: Dynamic binary lifting and recompilation[C]//Proc of the 5th European Conf on Computer Systems. New York: ACM, 2020: 1−16, articleTitle=null, refAbstract=null), Reference(id=1329419770945974497, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=69, rfOrder=69, authorNames=null, journalName=null, refType=null, unstructuredReference=GaloisInc. Reopt [EB/OL]. [2024-10-16]. https://github.com/GaloisInc/reopt, articleTitle=null, refAbstract=null), Reference(id=1329419771021471970, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=70, rfOrder=70, authorNames=null, journalName=null, refType=null, unstructuredReference=Engelke A, Schulz M. Instrew: Leveraging LLVM for high performance dynamic binary instrumentation[C]//Proc of the 16th ACM SIGPLAN/SIGOPS Int Conf on Virtual Execution Environments. New York: ACM, 2020: 172−184, articleTitle=null, refAbstract=null), Reference(id=1329419771096969443, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=71, rfOrder=71, authorNames=null, journalName=null, refType=null, unstructuredReference=Repzret. Dagger [EB/OL]. [2024-10-16]. https://github.com/repzret/dagger, articleTitle=null, refAbstract=null), Reference(id=1329419771168272612, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=72, rfOrder=72, authorNames=null, journalName=null, refType=null, unstructuredReference=rev. ng Labs. Revng [EB/OL]. [2024-10-16]. https://github.com/revng/revng, articleTitle=null, refAbstract=null), Reference(id=1329419771231187173, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=73, rfOrder=73, authorNames=null, journalName=null, refType=null, unstructuredReference=fay59. Fcd [EB/OL]. [2024-10-16]. https://github.com/fay59/fcd, articleTitle=null, refAbstract=null), Reference(id=1329419771310878950, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=74, rfOrder=74, authorNames=null, journalName=null, refType=null, unstructuredReference=angr. angr [EB/OL]. [2024-10-16]. https://github.com/angr/angr, articleTitle=null, refAbstract=null)], funds=null, companyList=[AuthorCompany(id=1329419759730405424, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=1, ext=[AuthorCompanyExt(id=1329419759747182641, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759730405424, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190), AuthorCompanyExt(id=1329419759755571250, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759730405424, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190)]), AuthorCompany(id=1329419759847845939, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=2, ext=[AuthorCompanyExt(id=1329419759856234548, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759847845939, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2University of Chinese Academy of Sciences, Beijing 100049), AuthorCompanyExt(id=1329419759860428853, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759847845939, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2中国科学院大学 北京 100049)]), AuthorCompany(id=1329419759927537718, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=3, ext=[AuthorCompanyExt(id=1329419759935926327, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759927537718, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=3Beijing Horizon Robotics Technology Research and Development Co., Ltd, Beijing 100089), AuthorCompanyExt(id=1329419759944314936, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759927537718, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=3北京地平线机器人技术研发有限公司 北京 100089)])], figs=[ArticleFig(id=1329419762192461925, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Figure 1, caption=Assembly code lifting assisted staic analysis, figureFileSmall=xxQ7iV+fhyrzhxknYSBEuA==, figureFileBig=L/dByS04BQ3966X5l9Njzg==, tableContent=null), ArticleFig(id=1329419762259570790, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=图1, caption=汇编代码提升辅助静态分析, figureFileSmall=xxQ7iV+fhyrzhxknYSBEuA==, figureFileBig=L/dByS04BQ3966X5l9Njzg==, tableContent=null), ArticleFig(id=1329419762473480295, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Figure 2, caption=Overview of LASM, figureFileSmall=FOPI12jxDpDpUmrzY6vkgw==, figureFileBig=Axa02eiaay7aiStNhrXv6Q==, tableContent=null), ArticleFig(id=1329419762523811944, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=图2, caption=LASM系统概览, figureFileSmall=FOPI12jxDpDpUmrzY6vkgw==, figureFileBig=Axa02eiaay7aiStNhrXv6Q==, tableContent=null), ArticleFig(id=1329419762578337897, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Figure 3, caption=The framework of LASM, figureFileSmall=WeYIKUU7GFUdLCpVdotDYA==, figureFileBig=n88I1nBhNEez7p9GcDf6Qw==, tableContent=null), ArticleFig(id=1329419762637058154, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=图3, caption=LASM系统框架, figureFileSmall=WeYIKUU7GFUdLCpVdotDYA==, figureFileBig=n88I1nBhNEez7p9GcDf6Qw==, tableContent=null), ArticleFig(id=1329419762704167019, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Figure 4, caption=Inline assembly extraction, figureFileSmall=M2RKWbj9I4FPKhcaAof9/Q==, figureFileBig=4IxtHUyEUnkGx/dpYg40EQ==, tableContent=null), ArticleFig(id=1329419762767081580, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=图4, caption=内嵌汇编抽取, figureFileSmall=M2RKWbj9I4FPKhcaAof9/Q==, figureFileBig=4IxtHUyEUnkGx/dpYg40EQ==, tableContent=null), ArticleFig(id=1329419762834190445, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Figure 5, caption=Env structure and assembly instruction emulation, figureFileSmall=ROM8xkJQ5Bpwde1Yt6tonw==, figureFileBig=tBGll6EPSQYnH4iGYkY5Lw==, tableContent=null), ArticleFig(id=1329419762888716398, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=图5, caption=Env结构体与汇编指令模拟, figureFileSmall=ROM8xkJQ5Bpwde1Yt6tonw==, figureFileBig=tBGll6EPSQYnH4iGYkY5Lw==, tableContent=null), ArticleFig(id=1329419762964213871, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Figure 6, caption=Propagate and access pointers via emulated registers, figureFileSmall=mXQkBeYZLM4AcIKrIJMEMg==, figureFileBig=Df3OSMyVNmSbs56xalCagQ==, tableContent=null), ArticleFig(id=1329419763022934128, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=图6, caption=通过模拟寄存器传播和访问指针, figureFileSmall=mXQkBeYZLM4AcIKrIJMEMg==, figureFileBig=Df3OSMyVNmSbs56xalCagQ==, tableContent=null), ArticleFig(id=1329419763090042993, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Figure 7, caption=Difference between using global Env and local Env, figureFileSmall=BU4ZCEkWBzAnssGl6W3p+A==, figureFileBig=22YJLmi54LEMLwqjGErv7A==, tableContent=null), ArticleFig(id=1329419763157151858, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=图7, caption=使用局部Env和使用全局Env的区别, figureFileSmall=BU4ZCEkWBzAnssGl6W3p+A==, figureFileBig=22YJLmi54LEMLwqjGErv7A==, tableContent=null), ArticleFig(id=1329419763241037939, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Figure 8, caption=Lifting global data in assembly code, figureFileSmall=t1+x9LCiajX994xaY41E/g==, figureFileBig=PdjFJnoSD3YsmUnBNC+jnA==, tableContent=null), ArticleFig(id=1329419763358478452, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=图8, caption=提升汇编代码中的全局数据, figureFileSmall=t1+x9LCiajX994xaY41E/g==, figureFileBig=PdjFJnoSD3YsmUnBNC+jnA==, tableContent=null), ArticleFig(id=1329419763438170229, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Figure 9, caption=Assembly code segmentation and pseudocode of instruction emulation, figureFileSmall=JSIPU3Z/T3D5aemYJ0V0kw==, figureFileBig=slQBuJ6vqoJfTFRIKLFrwA==, tableContent=null), ArticleFig(id=1329419763517862006, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=图9, caption=汇编代码切分和指令模拟伪代码, figureFileSmall=JSIPU3Z/T3D5aemYJ0V0kw==, figureFileBig=slQBuJ6vqoJfTFRIKLFrwA==, tableContent=null), ArticleFig(id=1329419763576582263, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Figure 10, caption=Function call across code boundaries, figureFileSmall=G9I8KShZvKO3PHfAkAo3iA==, figureFileBig=uPn5B4vVv3uzRhOJsuUiAQ==, tableContent=null), ArticleFig(id=1329419763639496824, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=图10, caption=跨代码边界的函数调用, figureFileSmall=G9I8KShZvKO3PHfAkAo3iA==, figureFileBig=uPn5B4vVv3uzRhOJsuUiAQ==, tableContent=null), ArticleFig(id=1329419763702411385, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Figure 11, caption=Functionality of glue functions, figureFileSmall=rCbTjJ3dZbHiJRrpOAO32w==, figureFileBig=/Xg2LkXSrkoWOs4bIMHTug==, tableContent=null), ArticleFig(id=1329419763769520250, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=图11, caption=胶水函数功能, figureFileSmall=rCbTjJ3dZbHiJRrpOAO32w==, figureFileBig=/Xg2LkXSrkoWOs4bIMHTug==, tableContent=null), ArticleFig(id=1329419763832434811, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Figure 12, caption=Atomic instructions optimization, figureFileSmall=cqVVTUp2IVSEmO2g7yNupw==, figureFileBig=utirM44M9pqIy+iFzu33fA==, tableContent=null), ArticleFig(id=1329419763895349372, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=图12, caption=原子指令优化, figureFileSmall=cqVVTUp2IVSEmO2g7yNupw==, figureFileBig=utirM44M9pqIy+iFzu33fA==, tableContent=null), ArticleFig(id=1329419763958263933, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Figure 13, caption=Pointer arithmetic instructions optimization, figureFileSmall=/wBvFe4np72VK1nY4zwq8w==, figureFileBig=C03XZicvbHBZtNnC7I2Nnw==, tableContent=null), ArticleFig(id=1329419764033761406, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=图13, caption=指针运算指令优化, figureFileSmall=/wBvFe4np72VK1nY4zwq8w==, figureFileBig=C03XZicvbHBZtNnC7I2Nnw==, tableContent=null), ArticleFig(id=1329419764105064575, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Figure 14, caption=LASM supports Saber to analyze the data flow of inline assembly, figureFileSmall=o4QWf39iUa5OV8cCn2z9pA==, figureFileBig=K/Ri78ZJKrTd1yQWZOlyrA==, tableContent=null), ArticleFig(id=1329419764172173440, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=图14, caption=LASM支持Saber分析内嵌汇编的数据流, figureFileSmall=o4QWf39iUa5OV8cCn2z9pA==, figureFileBig=K/Ri78ZJKrTd1yQWZOlyrA==, tableContent=null), ArticleFig(id=1329419764226699393, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Figure 15, caption=Lifting results of the df0.c binary via RetDec and mctoll, figureFileSmall=38CFdtggmyQpWIQwQsYWWw==, figureFileBig=B0ed/6fBd4+Bi2sAEMlcWQ==, tableContent=null), ArticleFig(id=1329419764289613954, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=图15, caption=RetDec和mctoll提升df0.c的二进制文件的结果, figureFileSmall=38CFdtggmyQpWIQwQsYWWw==, figureFileBig=B0ed/6fBd4+Bi2sAEMlcWQ==, tableContent=null), ArticleFig(id=1329419764348334211, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Figure 16, caption=LASM supports CRIX to analyze the data flow of inline assembly, figureFileSmall=QuqzTqSZizA0ZGrnvBf7Nw==, figureFileBig=xEMkwXVPCE7dUac/PJL6NQ==, tableContent=null), ArticleFig(id=1329419764415443076, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=图16, caption=LASM支持CRIX分析内嵌汇编的数据流, figureFileSmall=QuqzTqSZizA0ZGrnvBf7Nw==, figureFileBig=xEMkwXVPCE7dUac/PJL6NQ==, tableContent=null), ArticleFig(id=1329419764469969029, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Figure 17, caption=Comparison of data classification results by DataProt with and without the support of LASM, figureFileSmall=lJ/o0HnDn88bcgZL37CcJA==, figureFileBig=PIwbB2MJpmaCjIGBtntIHA==, tableContent=null), ArticleFig(id=1329419764545466502, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=图17, caption=有无LASM支持下DataProt数据分类结果对比, figureFileSmall=lJ/o0HnDn88bcgZL37CcJA==, figureFileBig=PIwbB2MJpmaCjIGBtntIHA==, tableContent=null), ArticleFig(id=1329419764625158279, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Figure 18, caption=LASM supports DataProt to analyze the data flow of inline assembly, figureFileSmall=TEFuK+if+apdpZ5faaEBeQ==, figureFileBig=bvSRkGKT1fZnNCCzkpp8GQ==, tableContent=null), ArticleFig(id=1329419764696461448, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=图18, caption=LASM支持DataProt分析内嵌汇编的数据流, figureFileSmall=TEFuK+if+apdpZ5faaEBeQ==, figureFileBig=bvSRkGKT1fZnNCCzkpp8GQ==, tableContent=null), ArticleFig(id=1329419764767764617, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Table 1, caption=

Handling Special Instructions

, figureFileSmall=null, figureFileBig=null, tableContent=
类型类型描述指令示例处理方式
1不影响程序分析INVLPG:无效tlb entry不模拟,仅标识该指令内容
2写特定寄存器CPUID:赋值Eax,Ebx,Ecx,Edx写模拟寄存器
3切换上下文环境VMRESUME:切换虚拟机状态重新初始化Env,切断数据流传播
), ArticleFig(id=1329419764851650698, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=表1, caption=

处理特殊指令

, figureFileSmall=null, figureFileBig=null, tableContent=
类型类型描述指令示例处理方式
1不影响程序分析INVLPG:无效tlb entry不模拟,仅标识该指令内容
2写特定寄存器CPUID:赋值Eax,Ebx,Ecx,Edx写模拟寄存器
3切换上下文环境VMRESUME:切换虚拟机状态重新初始化Env,切断数据流传播
), ArticleFig(id=1329419764914565259, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Table 2, caption=

Test Datasets for LASM Correctness Testing

, figureFileSmall=null, figureFileBig=null, tableContent=
测试集测试目的测试用例数量
LLVM Test Suite测试语义提升正确性119
SPEC CPU 2006测试语义融合正确性10
), ArticleFig(id=1329419764990062732, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=表2, caption=

用于LASM正确性测试的测试集

, figureFileSmall=null, figureFileBig=null, tableContent=
测试集测试目的测试用例数量
LLVM Test Suite测试语义提升正确性119
SPEC CPU 2006测试语义融合正确性10
), ArticleFig(id=1329419765082337421, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Table 3, caption=

Static Analysis Tools and Programs to Be Analyzed

, figureFileSmall=null, figureFileBig=null, tableContent=
静态分析工具静态分析工具的功能被分析的程序被分析程序数量
SVF Saber检测内存泄漏和重复释放程序缺陷SVF Test-Suite139
CRIX检测内核中关键数据的安全检查缺失Linux kernel 5.10.1121
DataProt对内核的全局数据进行分类保护Linux kernel 5.10.1121
), ArticleFig(id=1329419765141057678, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=表3, caption=

静态分析工具和被分析程序

, figureFileSmall=null, figureFileBig=null, tableContent=
静态分析工具静态分析工具的功能被分析的程序被分析程序数量
SVF Saber检测内存泄漏和重复释放程序缺陷SVF Test-Suite139
CRIX检测内核中关键数据的安全检查缺失Linux kernel 5.10.1121
DataProt对内核的全局数据进行分类保护Linux kernel 5.10.1121
), ArticleFig(id=1329419765203972239, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Table 4, caption=

Experimental Results of Lifting and Recompiling LLVM Test Suite

, figureFileSmall=null, figureFileBig=null, tableContent=
测试用例
总数
提升的
数量
再编译
数量
正确执行
数量
正确提升的
比例/%
11911911911092.44
), ArticleFig(id=1329419765271081104, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=表4, caption=

提升再编译LLVM Test Suite实验结果

, figureFileSmall=null, figureFileBig=null, tableContent=
测试用例
总数
提升的
数量
再编译
数量
正确执行
数量
正确提升的
比例/%
11911911911092.44
), ArticleFig(id=1329419765333995665, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Table 5, caption=

Reasons of Execution Failure After Lifting and Recompiling LLVM Test Suite

, figureFileSmall=null, figureFileBig=null, tableContent=
序号测试用例名称执行错误原因
12006-01-29-SimpleIndirectCall.c使用了变参函数
22008-07-13-InlineSetjmp.c使用了setjump
3tls.c多线程程序
4ConstructorDestructorAttributes.c使用了__attribute__
((constructor))属性
52003-05-14-AtExit.c使用了atexit注册函数
62006-01-23-UnionInit.c使用了#pragma pack()语法
7ccc.c使用了变参函数
8sign.c使用了__attribute__
((bitwidth(24)))属性
92004-08-12-InlinerAndAllocas.c使用了变参函数
), ArticleFig(id=1329419765413687442, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=表5, caption=

提升再编译LLVM 测试套件后执行错误的原因

, figureFileSmall=null, figureFileBig=null, tableContent=
序号测试用例名称执行错误原因
12006-01-29-SimpleIndirectCall.c使用了变参函数
22008-07-13-InlineSetjmp.c使用了setjump
3tls.c多线程程序
4ConstructorDestructorAttributes.c使用了__attribute__
((constructor))属性
52003-05-14-AtExit.c使用了atexit注册函数
62006-01-23-UnionInit.c使用了#pragma pack()语法
7ccc.c使用了变参函数
8sign.c使用了__attribute__
((bitwidth(24)))属性
92004-08-12-InlinerAndAllocas.c使用了变参函数
), ArticleFig(id=1329419765489184915, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Table 6, caption=

Details of Compile-Lift Test Files in SPEC CPU 2006 Test Set

, figureFileSmall=null, figureFileBig=null, tableContent=
测试用例编号测试用例名称测试用例代码量编译-提升测试文件的名称编译-提升文件代码量热点函数数量
400perlbench15.72万行doop.c1431行15
401bzip20.83万行huffman.c246行5
403gcc52.10万行cfgbuild.c883行13
429mcf0.27万行implicit.c,treeup.c,psimplex.c761行7
445gobmk19.72万行readconnect.c1669行6
456hmmer3.60万行hsregex.c,sqio.c3290行48
458sjeng1.39万行attacks.c,moves.c,neval.c3731行26
462libquantum0.44万行omuln.c,oaddn.c,qft.c459行16
464h264ref5.16万行mb_access.c,sei.c2338行58
482sphinx32.51万行dict.c,hmm.c,lextree.c,mdef.c,vithist.c3710行39
), ArticleFig(id=1329419765564682388, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=表6, caption=

SPEC CPU 2006测试集中编译—提升测试文件详情

, figureFileSmall=null, figureFileBig=null, tableContent=
测试用例编号测试用例名称测试用例代码量编译-提升测试文件的名称编译-提升文件代码量热点函数数量
400perlbench15.72万行doop.c1431行15
401bzip20.83万行huffman.c246行5
403gcc52.10万行cfgbuild.c883行13
429mcf0.27万行implicit.c,treeup.c,psimplex.c761行7
445gobmk19.72万行readconnect.c1669行6
456hmmer3.60万行hsregex.c,sqio.c3290行48
458sjeng1.39万行attacks.c,moves.c,neval.c3731行26
462libquantum0.44万行omuln.c,oaddn.c,qft.c459行16
464h264ref5.16万行mb_access.c,sei.c2338行58
482sphinx32.51万行dict.c,hmm.c,lextree.c,mdef.c,vithist.c3710行39
), ArticleFig(id=1329419765635985557, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Table 7, caption=

Reasons for Saber Detection Failure After RetDec Lifting

, figureFileSmall=null, figureFileBig=null, tableContent=
缺陷类别Saber检测失败的
测试用例数量
导致检测失败的原因合计失败率/%
内存泄漏25指针与整型的强制类型转换4447.83
11冗余的双层条件判断
6错误的代码提升
2复杂的控制流
重复释放3错误的代码提升36.38
), ArticleFig(id=1329419765711483030, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=表7, caption=

经RetDec提升后Saber检测失败的原因

, figureFileSmall=null, figureFileBig=null, tableContent=
缺陷类别Saber检测失败的
测试用例数量
导致检测失败的原因合计失败率/%
内存泄漏25指针与整型的强制类型转换4447.83
11冗余的双层条件判断
6错误的代码提升
2复杂的控制流
重复释放3错误的代码提升36.38
), ArticleFig(id=1329419765786980503, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Table 8, caption=

Detecting Results of CRIX with and without the Support of LASM

, figureFileSmall=null, figureFileBig=null, tableContent=
插入汇编的文件插入汇编的函数影响的关键数据CRIXLASM联合CRIX
drm/drm_memory.cdrm_legacy_ioremap_wcmap->handle失败成功
mm/page_alloc.calloc_pages_exactaddr失败成功
mm/swapfile.cmap_swap_entrysis失败成功
kernel/hpet.chpet_set_mappinghpet_virt_address失败成功
init/initramfs.cdir_addde->name失败成功
mac80211/mlme.cieee80211_send_associfmgd->assoc_req_ies失败成功
pci/irq.cpci_request_irqdevname失败成功
acpi/boot.cmp_config_acpi_gsiioapic失败成功
mm/vmstat.cinit_mm_internalsmm_percpu_wq失败成功
ipv4/devinet.c__inet_insert_ifaret失败成功
), ArticleFig(id=1329419765879255192, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=表8, caption=

有无LASM支持下CRIX的检测结果

, figureFileSmall=null, figureFileBig=null, tableContent=
插入汇编的文件插入汇编的函数影响的关键数据CRIXLASM联合CRIX
drm/drm_memory.cdrm_legacy_ioremap_wcmap->handle失败成功
mm/page_alloc.calloc_pages_exactaddr失败成功
mm/swapfile.cmap_swap_entrysis失败成功
kernel/hpet.chpet_set_mappinghpet_virt_address失败成功
init/initramfs.cdir_addde->name失败成功
mac80211/mlme.cieee80211_send_associfmgd->assoc_req_ies失败成功
pci/irq.cpci_request_irqdevname失败成功
acpi/boot.cmp_config_acpi_gsiioapic失败成功
mm/vmstat.cinit_mm_internalsmm_percpu_wq失败成功
ipv4/devinet.c__inet_insert_ifaret失败成功
), ArticleFig(id=1329419765954752665, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=EN, label=Table 9, caption=

Data Categories in Linux Kernel

, figureFileSmall=null, figureFileBig=null, tableContent=
数据类别标签/关键字读写操作发生的阶段
Data初始化阶段和初始化后阶段具有写操作
Constconst关键字初始化阶段和初始化后阶段均只有读操作
RoAfterInit__ro_after_init初始化阶段有读写操作,
初始化后阶段仅有读操作
Init__initdata仅初始化阶段有读写操作
InitConst__initconst仅初始化阶段有读操作
), ArticleFig(id=1329419766017667226, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, language=CN, label=表9, caption=

Linux内核中的数据类别

, figureFileSmall=null, figureFileBig=null, tableContent=
数据类别标签/关键字读写操作发生的阶段
Data初始化阶段和初始化后阶段具有写操作
Constconst关键字初始化阶段和初始化后阶段均只有读操作
RoAfterInit__ro_after_init初始化阶段有读写操作,
初始化后阶段仅有读操作
Init__initdata仅初始化阶段有读写操作
InitConst__initconst仅初始化阶段有读操作
)], attaches=null, journal=Journal(id=1324759606947315908, delFlag=0, nameCn=计算机研究与发展, nameEn=Journal of Computer Research and Development, nameHistory1=null, nameHistory2=null, issn=1000-1239, eissn=null, cn=11-1777/TP, coden=null, periodic=0, language=CN, oaType=null, ccby=null, superviseOffice=null, ownerOffice=null, pubOffice=null, editorOffice=null, officeType=null, aims=null, clcCode=null, officeProv=null, officeCity=null, officeAddr=null, officeZip=null, officeEmail=null, officePhone=null, editDirector=null, officeDirector=null, officeDirectorPhone=null, officeStaffNum=null, officeEmpNum=null, coverPicUrl=k2l8zgqwstuxxevFX2qxVA==, journalPrice=null, startedYear=null, abbrevIsoEn=Journal of Computer Research and Development, journalRemark=null, publicationField=null, createdTime=1793776903141, updatedTime=1793850698612, createdBy=18614031015, updatedBy=13701087609, firstLetterCn=J, firstLetterEn=J, subjectCode=Electronic Information, subjectName=null, subjectCodeEn=Electronic Information, subjectNameEn=null, picCn=k2l8zgqwstuxxevFX2qxVA==, picEn=r6k0Ry+RD+c/VXj5QarmDw==, jcr=null, cjcr=null, exts=[JournalExt(id=1325069127710286688, language=CN, name=计算机研究与发展, nameHistory1=null, nameHistory2=null, managedBy=, sponsoredBy=, publishedBy=, editorOffice=, officeProv=null, officeCity=null, officeAddr=, officeZip=, editDirector=, officeDirector=null, officePhone=null, coverPicUrl=null, journalRemark=, submitArticleUrl=null, websiteUrl=, createdTime=1793850698640, updatedTime=1793850698640, createdBy=13701087609, updatedBy=13701087609, submissionGuidelinesUrl=, submissionAuthorUrl=https://crad.ict.ac.cn/journalx/authorLogOn.action, submissionEditorUrl=https://crad.ict.ac.cn/journalx/editorLogOn.action, submissionReviewUrl=https://crad.ict.ac.cn/journalx/expertLogOn.action, submissionCeEditorUrl=https://crad.ict.ac.cn/journalx/editorInChiefLogOn.action, submissionAeEditorUrl=, option={"copyright":""}), JournalExt(id=1325069127777395553, language=EN, name=Journal of Computer Research and Development, nameHistory1=null, nameHistory2=null, managedBy=, sponsoredBy=, publishedBy=, editorOffice=, officeProv=null, officeCity=null, officeAddr=, officeZip=, editDirector=, officeDirector=null, officePhone=null, coverPicUrl=null, journalRemark=, submitArticleUrl=null, websiteUrl=, createdTime=1793850698656, updatedTime=1793850698656, createdBy=13701087609, updatedBy=13701087609, submissionGuidelinesUrl=, submissionAuthorUrl=https://crad.ict.ac.cn/journalx/authorLogOn.action, submissionEditorUrl=https://crad.ict.ac.cn/journalx/editorLogOn.action, submissionReviewUrl=https://crad.ict.ac.cn/journalx/expertLogOn.action, submissionCeEditorUrl=https://crad.ict.ac.cn/journalx/editorInChiefLogOn.action, submissionAeEditorUrl=, option={"copyright":""})], databaseList=null, tenantJournalId=1324759914146529478, websiteList=[Website(id=1325070300139892771, webName=null, webTitle=null, webDomain=null, webCopyrigh=null, webIpcNo=null, seoTitle=null, seoKeywords=null, seoDescription=null, tenantJournalId=null, journalId=1324759914146529478, journalNameCn=null, journalNameEn=null, grayFlag=null, tenantId=1146029695717560320, platformId=null, journalGroupId=null, journalGroupNameCn=null, journalGroupNameEn=null, type=1, domain=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN, language=CN, createTime=1793850978169, createBy=18614031015, updateTime=1793851040259, updateBy=18614031015, name=计算机研究与发展-中文, tplId=1146099689490845704, title=计算机研究与发展, delFlag=0, indexPage=/home, props=[WebsiteProps(id=1325070893751349360, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=articleTextType, value=kx, createTime=1793851119697, updateTime=1793851119697, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893730377837, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=banner, value=null, createTime=1793851119692, updateTime=1793851119692, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893772320883, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=grayFlag, value=0, createTime=1793851119702, updateTime=1793851119702, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893721989228, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=logo, value=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/file/pic?fileId=U27tDsy717YF7XSPA+Vwdw==, createTime=1793851119690, updateTime=1793851119690, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893784903797, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=minRunFlag, value=0, createTime=1793851119705, updateTime=1793851119705, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893742960751, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=picServerUrl, value=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/file/pic, createTime=1793851119695, updateTime=1793851119695, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893780709492, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=silenceFlag, value=0, createTime=1793851119704, updateTime=1793851119704, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893738766446, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=staticResourcePath, value=https://castjournals.cast.org.cn/joweb/cast_kjdb_cn_619/, createTime=1793851119694, updateTime=1793851119694, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893755543665, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=themeColor, value=null, createTime=1793851119698, updateTime=1793851119698, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893763932274, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=themeStyle, value=null, createTime=1793851119700, updateTime=1793851119700, creator=18614031015, updator=18614031015)]), Website(id=1325070300580294698, webName=null, webTitle=null, webDomain=null, webCopyrigh=null, webIpcNo=null, seoTitle=null, seoKeywords=null, seoDescription=null, tenantJournalId=null, journalId=1324759914146529478, journalNameCn=null, journalNameEn=null, grayFlag=null, tenantId=1146029695717560320, platformId=null, journalGroupId=null, journalGroupNameCn=null, journalGroupNameEn=null, type=1, domain=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN, language=EN, createTime=1793850978274, createBy=18614031015, updateTime=1793851036638, updateBy=18614031015, name=计算机研究与发展-英文, tplId=1146101810881728533, title=Journal of Computer Research and Development, delFlag=0, indexPage=/home, props=[WebsiteProps(id=1325070925288321148, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=articleTextType, value=kx, createTime=1793851127216, updateTime=1793851127216, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925263155321, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=banner, value=null, createTime=1793851127210, updateTime=1793851127210, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925309292671, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=grayFlag, value=0, createTime=1793851127221, updateTime=1793851127221, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925254766712, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=logo, value=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/file/pic?fileId=U27tDsy717YF7XSPA+Vwdw==, createTime=1793851127208, updateTime=1793851127208, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925326069889, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=minRunFlag, value=0, createTime=1793851127225, updateTime=1793851127225, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925279932539, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=picServerUrl, value=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/file/pic, createTime=1793851127214, updateTime=1793851127214, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925317681280, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=silenceFlag, value=0, createTime=1793851127223, updateTime=1793851127223, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925271543930, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=staticResourcePath, value=https://castjournals.cast.org.cn/joweb/cast_kjdb_en_623/, createTime=1793851127212, updateTime=1793851127212, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925292515453, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=themeColor, value=null, createTime=1793851127217, updateTime=1793851127217, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925300904062, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=themeStyle, value=null, createTime=1793851127219, updateTime=1793851127219, creator=18614031015, updator=18614031015)])], journalTitle=计算机研究与发展, weixinUrl=null, journalUrl=https://crad.ict.ac.cn/, iacademicId=null, status=1, seqNo=null, journalTitleEn=Journal of Computer Research and Development, journalPhotoCn=k2l8zgqwstuxxevFX2qxVA==, journalPhotoEn=r6k0Ry+RD+c/VXj5QarmDw==, journalFirstLetter=J, journalRecommend=null, journalNew=null, journalCollection=null, jcrJf=null, cjcrJf=null, jcrJfStr=null, cjcrJfStr=null, submissionFirstDecision=null, sciSubjectClassification=null, casSubjectClassification=null, citeScore=null, totalCitationFrequency=null, icpCode=null, psCode=null, advertisingLicenseCode=null, copyrightInformation=null, country=null, option=, provinceCode=null, provinceName=null, collectFlag=false, interPubPlatform=, interPubPlatformUrl=null), detailUrlCn=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/10.7544/issn1000-1239.202440881, detailUrlEn=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/10.7544/issn1000-1239.202440881, pdfUrlCn=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/PDF/10.7544/issn1000-1239.202440881, pdfUrlEn=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/PDF/10.7544/issn1000-1239.202440881, aliStartDate=0, aliEndDate=0, collectionFlag=false, citedCount=null, citedUrl=null, previewStatus=0, delFlag=0, hasFullText=1, orderTime=1777564800000, fullTextJson=null, articleText=null, reference=null)
收藏切换
LASM:面向全程序分析的x86内嵌汇编代码自动提升
赖远明 1, 2 , 王喆 1, 2 , 武成岗 1, 2 , 于丁 3 , 侯承轩 1, 2
计算机研究与发展 | 软件技术 2026,63(5): 1350-1375
收起
收藏切换
计算机研究与发展 |软件技术 2026 , 63 (5) : 1350 -1375
LASM:面向全程序分析的x86内嵌汇编代码自动提升
全屏
[Author(id=1329419759998840890, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, orderNo=0, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=laiyuanming@ict.ac.cn, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419760082726973, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419759998840890, language=EN, stringName=Yuanming Lai, firstName=Yuanming, middleName=null, lastName=Lai, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, address=1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190
2University of Chinese Academy of Sciences, Beijing 100049, bio={"content":"

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

"}, bioImg=null, bioContent=

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

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419760145641534, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419759998840890, language=CN, stringName=赖远明, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, address=1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190
2中国科学院大学 北京 100049, bio={"img":"SOv+jRxCuT8wWWhoMKnapA==","content":"

1991年生。博士。主要研究方向为二进制翻译、计算机系统安全、代码混淆

"}, bioImg=SOv+jRxCuT8wWWhoMKnapA==, bioContent=

1991年生。博士。主要研究方向为二进制翻译、计算机系统安全、代码混淆

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419759730405424, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=1, ext=[AuthorCompanyExt(id=1329419759747182641, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759730405424, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190), AuthorCompanyExt(id=1329419759755571250, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759730405424, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190)]), AuthorCompany(id=1329419759847845939, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=2, ext=[AuthorCompanyExt(id=1329419759856234548, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759847845939, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2University of Chinese Academy of Sciences, Beijing 100049), AuthorCompanyExt(id=1329419759860428853, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759847845939, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2中国科学院大学 北京 100049)])]), Author(id=1329419760233721920, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, orderNo=1, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419760317608003, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419760233721920, language=EN, stringName=Zhe Wang, firstName=Zhe, middleName=null, lastName=Wang, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, address=1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190
2University of Chinese Academy of Sciences, Beijing 100049, bio={"content":"

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

"}, bioImg=null, bioContent=

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

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419760384716868, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419760233721920, language=CN, stringName=王喆, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, address=1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190
2中国科学院大学 北京 100049, bio={"img":"egBsTxyRBOD9X9zpDPcK2w==","content":"

1990年生。博士,副研究员,硕士生导师。CCF会员。主要研究方向为计算机系统安全、操作系统、体系结构

"}, bioImg=egBsTxyRBOD9X9zpDPcK2w==, bioContent=

1990年生。博士,副研究员,硕士生导师。CCF会员。主要研究方向为计算机系统安全、操作系统、体系结构

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419759730405424, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=1, ext=[AuthorCompanyExt(id=1329419759747182641, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759730405424, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190), AuthorCompanyExt(id=1329419759755571250, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759730405424, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190)]), AuthorCompany(id=1329419759847845939, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=2, ext=[AuthorCompanyExt(id=1329419759856234548, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759847845939, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2University of Chinese Academy of Sciences, Beijing 100049), AuthorCompanyExt(id=1329419759860428853, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759847845939, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2中国科学院大学 北京 100049)])]), Author(id=1329419760456020038, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, orderNo=2, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419760535711817, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419760456020038, language=EN, stringName=Chenggang Wu, firstName=Chenggang, middleName=null, lastName=Wu, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, address=1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190
2University of Chinese Academy of Sciences, Beijing 100049, bio={"content":"

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)

"}, bioImg=null, bioContent=

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)

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419760611209290, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419760456020038, language=CN, stringName=武成岗, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, address=1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190
2中国科学院大学 北京 100049, bio={"img":"RDiUCAQkvOk6tpH04i93rw==","content":"

1969年生。博士,研究员,博士生导师。CCF杰出会员。主要研究领域为二进制翻译、编译优化、计算机系统安全

"}, bioImg=RDiUCAQkvOk6tpH04i93rw==, bioContent=

1969年生。博士,研究员,博士生导师。CCF杰出会员。主要研究领域为二进制翻译、编译优化、计算机系统安全

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419759730405424, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=1, ext=[AuthorCompanyExt(id=1329419759747182641, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759730405424, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190), AuthorCompanyExt(id=1329419759755571250, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759730405424, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190)]), AuthorCompany(id=1329419759847845939, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=2, ext=[AuthorCompanyExt(id=1329419759856234548, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759847845939, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2University of Chinese Academy of Sciences, Beijing 100049), AuthorCompanyExt(id=1329419759860428853, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759847845939, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2中国科学院大学 北京 100049)])]), Author(id=1329419760669929548, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, orderNo=3, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419760737038414, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419760669929548, language=EN, stringName=Ding Yu, firstName=Ding, middleName=null, lastName=Yu, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=3, address=3Beijing Horizon Robotics Technology Research and Development Co., Ltd, Beijing 100089, bio={"content":"

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

"}, bioImg=null, bioContent=

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

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419760808341583, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419760669929548, language=CN, stringName=于丁, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=3, address=3北京地平线机器人技术研发有限公司 北京 100089, bio={"img":"jrEFIgJhs7IUnk8oHUI6eA==","content":"

1996年生。硕士。主要研究方向为软件安全、编译优化

"}, bioImg=jrEFIgJhs7IUnk8oHUI6eA==, bioContent=

1996年生。硕士。主要研究方向为软件安全、编译优化

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419759927537718, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=3, ext=[AuthorCompanyExt(id=1329419759935926327, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759927537718, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=3Beijing Horizon Robotics Technology Research and Development Co., Ltd, Beijing 100089), AuthorCompanyExt(id=1329419759944314936, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759927537718, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=3北京地平线机器人技术研发有限公司 北京 100089)])]), Author(id=1329419760879644753, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, orderNo=4, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=houchengxuan16@mails.ucas.ac.cn, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419760946753620, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419760879644753, language=EN, stringName=Chengxuan Hou, firstName=Chengxuan, middleName=null, lastName=Hou, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, address=1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190
2University of Chinese Academy of Sciences, Beijing 100049, bio={"content":"

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

"}, bioImg=null, bioContent=

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

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419761001279573, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, authorId=1329419760879644753, language=CN, stringName=侯承轩, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, 2, address=1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190
2中国科学院大学 北京 100049, bio={"img":"g8a0HihroPMBpOnvmGQJTw==","content":"

1998年生。博士研究生。主要研究方向为操作系统安全、虚拟化技术

"}, bioImg=g8a0HihroPMBpOnvmGQJTw==, bioContent=

1998年生。博士研究生。主要研究方向为操作系统安全、虚拟化技术

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419759730405424, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=1, ext=[AuthorCompanyExt(id=1329419759747182641, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759730405424, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1State Key Lab of Processors (Institute of Computing Technology, Chinese Academy of Sciences), Beijing 100190), AuthorCompanyExt(id=1329419759755571250, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759730405424, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190)]), AuthorCompany(id=1329419759847845939, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, xref=2, ext=[AuthorCompanyExt(id=1329419759856234548, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759847845939, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2University of Chinese Academy of Sciences, Beijing 100049), AuthorCompanyExt(id=1329419759860428853, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419755095700480, companyId=1329419759847845939, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2中国科学院大学 北京 100049)])])]
赖远明1, 2 , 王喆1, 2, 武成岗1, 2, 于丁3, 侯承轩1, 2
作者信息
  • 1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190
  • 2中国科学院大学 北京 100049
  • 3北京地平线机器人技术研发有限公司 北京 100089
作者简介:

作者贡献声明

赖远明是论文工作的主要完成人,负责设计与实现LASM系统,设计并实施了实验,分析实验结果,撰写和修改论文;王喆对系统设计提出了建议并修改论文;武成岗为论文撰写提供了建议和指导;于丁参与了部分汇编指令语义模拟函数的实现;侯承轩参与了面向静态分析优化的实现。

1991年生。博士。主要研究方向为二进制翻译、计算机系统安全、代码混淆

1990年生。博士,副研究员,硕士生导师。CCF会员。主要研究方向为计算机系统安全、操作系统、体系结构

1969年生。博士,研究员,博士生导师。CCF杰出会员。主要研究领域为二进制翻译、编译优化、计算机系统安全

1996年生。硕士。主要研究方向为软件安全、编译优化

1998年生。博士研究生。主要研究方向为操作系统安全、虚拟化技术

LASM: Automatically Lift x86 Inline Assembly for Whole Program Analysis
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. ()

出版时间: 2026-05-01 doi: 10.7544/issn1000-1239.202440881
文章导航
收藏切换

C/C++和汇编语言混合编程在软件开发中被广泛使用。汇编语言的复杂性让混合编程容易出错。静态程序分析工具能减少软件漏洞,提高其鲁棒性。但基于LLVM IR开发的静态程序分析工具无法分析程序中的内嵌汇编代码。内嵌汇编代码影响程序中的数据流和控制流。静态分析工具忽略汇编代码导致程序中部分数据流未被纳入到分析中,使得误报率增加,准确率降低。设计并实现了LASM系统,该系统能将C/C++代码中的x86内嵌汇编代码自动提升成LLVM IR,并与编译C/C++得到的中间表示(IR)相融合,让下游的静态程序分析工具能对程序的所有代码进行全程序分析,降低误报率,提高准确率。LASM通过模拟硬件执行环境并使用LLVM IR的指令模拟汇编指令的语义,实现了汇编代码到LLVM IR的提升,并针对静态分析提供了原子指令语义简化和指针运算指令语义提升的优化。LASM能正确完整地模拟汇编指令的语义,提升汇编代码得到的LLVM IR代码在编译链接成可执行文件后可以正确运行。同时,LASM能和下游基于LLVM IR的静态程序分析工具无缝衔接,不需要任何适配即可增强工具的分析效果,达到复用和增强大量已有分析工具的目标。实验表明,LASM能支持针对Linux kernel的静态程序分析。在基于SVF分析Linux kernel对其全局变量的访问,并基于访问发生在初始化阶段还是初始化后阶段对变量进行分类的实验中,LASM的支持使分析精度提高了8.06个百分点,错误分类的变量数量下降了62.03%,在没有引入新分类错误的情况下多找到了14.80%的可保护变量。

内嵌汇编  /  C/C++与汇编混合编程  /  汇编代码提升  /  语义融合  /  静态分析  /  全程序分析  /  LLVM中间表示

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
C/C++等高层级程序设计语言为软件开发提供了更高层级的抽象,让开发者从内存布局、硬件特性等繁杂的细节中解脱出来,把精力聚焦在实现软件的功能逻辑上,提高了软件开发效率。汇编语言则赋予了开发者直接操作硬件,精确选择指令和精细排布指令及数据的能力,有助于实现更高效的代码和操作特权硬件。C/C++语言和汇编语言在软件开发上各有优势。因此,这2种语言混合编程被广泛应用于操作系统、嵌入式软件和高性能科学计算库等底层系统软件的开发上。例如,Linux内核中存在大量汇编代码,大约占内核总代码量的2%[1]。在大型科学计算库OpenBLAS中,汇编代码的占比接近20%[2]。在使用defconfig配置编译的Linux kernel 5.10.112中,一共有48694个函数,其中多达18327个函数含有内嵌汇编代码,占总函数数量的37.64%。使用C/C++实现的Debian的包中,大约有11%直接或间接依赖于内嵌汇编,在Github上排名最靠前的那些C语言工程里,有28.1%包含内嵌汇编代码[3-4]。
开发者使用汇编语言编程时,由于缺失了编译器的大量检查,非常容易编写出有漏洞的代码。即使是最资深的Linux内核开发者,在编写内嵌汇编代码时也容易出错,并且这类错误难以被审查和人工定位[5-7]。静态程序分析技术能帮助开发者发现软件中潜在的漏洞和安全缺陷。这项技术在发现和定位程序漏洞上的应用已经有很长的历史。早在1979年,能检测类型转换错误、未使用变量和未初始化变量的lint就与Unix7一起被发布。NASA要求所有软件都必须经过静态分析工具的分析后才能投入使用[8-9]。软件开发行业的实践证明了该技术的应用能降低软件研发成本,减少软件安全缺陷,提高软件安全性和健壮性[10]。
LLVM IR是LLVM编译框架的中间表示,它是SSA格式的,具有语言无关的类型系统,可提供程序代码的高层级信息,能很好地支持各种复杂精细的代码分析和变换[11]。目前已涌现出大量基于LLVM IR的静态程序分析工具。SVF[12]是其中最受欢迎、性能最好的开源工具之一[13]。但这些工具都只能分析程序中使用高级语言编写的那部分代码,无法分析程序中的汇编代码。在分析混合编程实现的软件时,要么人工处理汇编代码,对其进行建模,从而辅助工具进行分析,要么不分析汇编代码。例如,在分析Linux kernel时,CRIX[14]和LRSan[15]需要对汇编进行手动处理,IPPO[16],HERO[17]则没有处理和分析汇编代码。
在混合编程的场景中,汇编代码被嵌入C/C++代码中,或被存储在单独的汇编文件中。Clang将软件源代码编译成LLVM IR时,不将汇编文件作为它的输入,并将嵌于C/C++语言代码内部的内嵌汇编代码视作黑盒,把内嵌汇编指令作为字符串嵌入中间表示(IR)指令中,不做额外处理。这导致以LLVM IR作为输入的静态程序分析工具普遍忽略程序IR中的内嵌汇编,跳过对它的分析。这种处理方式有2个方面的负面影响:一是汇编中的漏洞或安全缺陷无法被静态分析工具发现;二是忽略了汇编对程序数据流和控制流的影响,导致分析高级语言代码的准确性下降,产生误报率更高、准确率更低的分析结果。而误报率高和准确率低是静态分析在实际应用中的最大障碍之一[8,18]。过往的研究表明,误报率超过30%的静态分析工具就会被弃用[19]。有的静态分析工具[20]选择牺牲一定的可靠性(soundness)来提高精度(precision),避免过高的误报率。
为解决上述问题,让基于LLVM IR的静态程序分析工具能同时分析程序中的C/C++代码和内嵌汇编代码,实现全程序分析(whole program analysis)的目标,本文设计并实现了LASM系统。该系统能自动地将程序的x86汇编代码提升为LLVM IR表示,并将提升汇编代码得到的IR与编译高级语言代码得到的IR进行融合,生成对静态程序分析友好的LLVM IR。LASM能无缝接入下游的静态程序分析工具的工作流中。
实验表明,LASM能正确提升汇编代码,并为下游基于LLVM IR的静态程序分析工具检测程序内嵌汇编中的数据流提供有效支持。经LASM提升得到的IR被编译成可执行文件后依然能正确执行。软件中的内嵌汇编代码被提升成LLVM IR后,对静态分析工具而言不再是黑盒,能让分析工具识别和跟踪到更完整的数据流和控制流,从而得到准确率更高的分析结果。本文在SVF Test Suite[21]测试集和Linux kernel上分别验证了LASM对静态程序分析工具Saber[22]和CRIX[14]检测内嵌汇编中的数据流的支持。在使用静态分析工具DataProt分析Linux内核对其全局变量的读写情况,并根据读写操作发生的阶段对变量进行分类的实验中,LASM让错误分类的变量数量下降了62.03%,精度提高了8.06个百分点,多找到了14.80%的可保护变量,并且不会引入新的分析错误。这些实验证明LASM对内嵌汇编的提升能帮助下游基于LLVM IR的静态程序分析器获得更好的分析效果。
本文的贡献如下:
1)以支持静态程序分析为目标,提出了基于语义模拟的x86-64内嵌汇编提升方法,可将汇编代码正确地提升成LLVM IR,避免错误的代码提升干扰下游的静态分析工具。经LASM提升得到的IR再编译后可正确执行。
2)采用语义融合技术将提升汇编得到的IR和编译高级语言得到的IR融合在一起,实现了高级语义与汇编语义的融合,在保留了高级语义的同时,为下游的静态分析工具提供汇编代码的语义信息,以实现全程序分析的目标。
3)针对静态程序分析设计了原子指令语义简化和指针运算指令语义提升的优化机制,让LASM生成对静态分析更加友好的IR。
4)通过实验证明LASM能帮助静态程序分析工具识别内嵌汇编中的数据流和控制流,降低静态分析的误报率,提高分析精度。
LLVM[23]编译框架源于伊利诺伊大学的一个研究项目。它采用编译器经典的3段式设计,即前端(frontend)、中端(optimizer)和后端(backend)。高级语言代码先被前端编译成平台无关的LLVM IR中间表示,以便中端对代码实施各种编译优化。经过多年的发展,LLVM已经包含了许多项目,形成了非常完整的工具链,并在学术研究和商业领域被广泛使用。LLVM IR是SSA格式的,并且是平台无关的,非常适合用于静态程序分析。因此有大量的静态分析工具是基于LLVM IR开发的。使用任何高级语言开发的软件,只要能被编译成LLVM IR,就能使用这类工具对它进行分析。LLVM还有其他的中间代码表示,例如用于后端的MachineInstr和MCInst。LASM在提升汇编代码前,先将其转化成MCInst表示。
LLVM将LLVM IR编译成汇编代码的过程被称为lowering。代码提升则是相反的过程,它将二进制代码或汇编代码转换成LLVM IR等高级语言表示。低级语言的代码被提升成LLVM IR后,就能使用基于LLVM IR的静态程序分析工具对它们进行安全检查和漏洞扫描。我们称通过代码提升得到的LLVM IR为Lifted-IR,将编译高级语言得到的LLVM IR称为High-IR。LASM融合Lifted-IR和High-IR后得到的IR被称为Mixed-IR。
静态程序分析通过在源码上静态地分析程序状态和数据流的传播,无需程序的输入和动态执行就能发现潜在的安全缺陷和漏洞,可以获得很高的分析效率和代码覆盖率,被广泛用于大型系统软件的程序缺陷检测中[13]。全程序分析是指使用静态分析技术对程序的所有代码进行统一的、一致性的分析,这可以提升静态分析的效果[24-25]。
在软件开发中,为了同时获得更高层级的抽象描述能力,高性能、细粒度的指令选择能力和直接操作硬件的能力,汇编语言和C/C++语言混合编程被广泛使用[3-4]。然而,混合编程会引入2个方面的问题。一方面,使用汇编语言编程更容易出错,在程序中引入难以被人工发现和定位的漏洞或安全缺陷[26-28]。另一方面,虽然现在涌现出很多出色的基于LLVM IR的静态程序分析工具,它们能分析C/C++代码,但对汇编代码无能为力,无法用来查找汇编中潜在的漏洞和安全缺陷。程序中的汇编代码还影响数据流和控制流,静态分析工具忽略了这种影响,导致其对C/C++代码的分析精度下降。目前缺乏能对混合编程实现的软件进行全程序分析的静态程序分析工具。
解决上述问题的一种可行方案是使用不同分析工具分别对高级语言代码和汇编代码进行分析,然后合并分析结果。但研究表明分别分析多个独立模块,然后合并分析结果,会降低分析的准确率[24]。
另一种方案是将高级语言和汇编语言转成同一种表示,再对其进行分析。比如先将C/C++代码编译成汇编代码,再使用面向汇编代码的静态程序分析工具对其进行分析。这种方法不需要合并分析结果。但C/C++代码在编译成汇编代码后,丢失了高级语义信息,比如复杂的数据结构信息,这对静态分析非常不利。在汇编代码上进行静态分析远不如在LLVM IR上高效。也可以通过手动编写与汇编代码等价的LLVM IR,实现基于LLVM IR的全程序分析。但这种方法非常低效,且容易出错,难以大规模使用。
本文将程序中的汇编代码自动地提升成LLVM IR,并将其与编译C/C++代码得到的IR进行融合,让下游大量基于LLVM IR的静态程序分析工具能对含有汇编代码的C/C++程序进行全程序分析,如图1所示。待分析程序经LASM的汇编代码提升处理后,可直接作为下游静态程序分析工具的输入,无需对静态分析工具进行任何额外的适配,达到复用现有分析工具和提升分析精度的目的。这种方法的优势在于能将C/C++代码的高级语义信息和汇编代码的语义信息整合在一起,让基于LLVM IR的静态程序分析工具能分析程序完整的数据流和控制流,从而提升分析精度。
LASM的设计目标是保留High-IR中的高层级语义信息,保证汇编代码提升的正确性,并生成对静态程序分析友好的LLVM IR。核心思路是保留所有的High-IR,将程序中的内嵌汇编代码提升为Lifted-IR,并将2种IR融合成一个整体。如图2所示,混合编程的程序被Clang编译成LLVM IR后,内嵌汇编代码和IR是交织在一起的。首先,LASM从IR中抽取出内嵌汇编代码,实现汇编代码和High-IR的完全分离。随后,LASM采用模拟执行的方式,将汇编指令逐条转换成LLVM IR指令序列。最后LASM通过自动生成胶水函数,完成Lifted-IR和High-IR之间的语义融合,并对Lifted-IR实施面向静态分析的代码优化,得到对静态程序分析友好的Mixed-IR。
LASM采用的技术路线对静态程序分析更友好,但面临3个技术挑战:1)如何语义等价地将汇编代码提升为LLVM IR,保证正确性;2)High-IR和Lifted-IR存在语义鸿沟;3)如何让提升得到的代码对静态程序分析更友好。为解决上述挑战,LASM使用IR指令等价模拟汇编指令的语义,使用胶水函数融合High-IR和Lifted-IR的语义,并针对静态分析场景做了相应的优化。
LASM系统包含6个核心模块,如图3所示。汇编抽取模块将每一段内嵌汇编代码抽取到一个新的LLVM IR函数中。该函数被称为内嵌汇编函数,它将被编译成汇编文件。在High-IR中对内嵌汇编的调用则被修改成了对内嵌汇编函数的调用。经过汇编抽取后,High-IR中就没有内嵌汇编代码了。硬件环境模拟模块将各类寄存器和栈模拟成LLVM IR中的Env结构体。汇编数据提升模块则是将汇编代码中定义的全局变量提升为LLVM IR中的全局结构体变量。
汇编指令提升模块先将汇编代码解析为MCInst,并将其切分成LiftBlock。每一个LiftBlock都会被提升成一个LLVM IR函数,并用LLVM IR的指令序列逐条模拟MCInst指令的语义。
语义融合模块生成胶水函数,用于衔接Lifted-IR和High-IR。Lifted-IR和High-IR具有不同的函数调用约定和内存模型,在胶水函数的帮助下才能实现二者之间数据流的联通,完成跨代码边界的函数调用。
代码优化模块先使用LLVM的内联优化等编译优化机制对Lifted-IR进行优化,并针对Lifted-IR中的原子指令和指针运算指令进行优化,生成对静态分析器更加友好的IR。
内嵌汇编抽取是为了实现IR和内嵌汇编代码的分离。图4(a)所示的C语言代码是含有内嵌汇编的函数foo,它被Clang编译后得到图4(c)所示的IR。从图4(c)中可以看出,LLVM IR将内嵌汇编代码当作黑盒,通过call指令调用它。编译器在将IR编译成汇编代码时,将按照约定好的接口创建它和内嵌汇编之间的衔接指令,并将内嵌汇编中的占位符转换成指令的合法操作数,这个过程非常复杂[29],难以对其进行建模。LASM先将调用内嵌汇编代码的语句提取到新建函数@foo_inline0中,如图4(d)所示。函数@foo对内嵌汇编的调用语句则被修改成对函数@foo_inline0的调用,如图4(b)所示。随后,函数@foo_inline0及其依赖的数据定义被抽取到一个新建的文件foo_ASMFunc.bc中。将该文件编译成汇编文件后再对它进行汇编代码提升处理。完成内嵌汇编抽取后,IR和汇编之间的边界变得清晰,数据交互则遵循API调用约定,方便LASM的后续处理。
为了精确和完整地提升汇编代码的语义,LASM在LLVM IR层模拟了一套硬件执行环境,即Env。Env是一个结构体,如图5所示。汇编指令操作的硬件资源包括寄存器和内存。其中内存又可以分为全局数据区(.data节,.rodata节,.bss节等)、堆和栈。LASM模拟了所有寄存器。全局数据区中存放的是程序的全局数据,LASM将这些全局数据提升为LLVM IR的结构体类型的数据。汇编代码对堆上数据的操作均始于调用malloc等动态内存分配的API。提升汇编时,只需要使用LLVM IR调用对应的API函数即可。LASM使用数组来模拟栈,并在初始化Env时,将Env.Rsp指向它。模拟的栈被称为软件栈。
对物理寄存器的模拟需要选择与其位宽相等的数据类型来模拟。一个直观的方案是使用不同位宽的整型来模拟对应位宽的寄存器。比如使用i64类型模拟Rax等64b寄存器。但这样做会导致将一个指针类型的数据存入模拟寄存器前,必须先将指针转换成整型。对保存在模拟寄存器中的指针进行解引用前,必需先以整数的形式将它从Env中取出,然后将其转换成目标类型的指针,伪代码如图6所示。使用inttoptr和ptrtoint指令在指针和整型数据之间进行转换将影响静态程序分析工具对指针传播的跟踪,导致不精确的指针别名分析结果。LASM使用LLVM IR中的指针类型i8*来模拟64b寄存器,其他位宽的寄存器则使用对应位宽的整型模拟。如图6所示,在这种设计选择下,当指针通过虚拟寄存器进行传播和使用时,发生的是不同指针类型之间的转换,避免了将内存中的整型数据转换成指针类型的操作。当64b整数类型存入虚拟寄存器时,也会发生整型和指针类型之间的类型转换,但被操作数据实际上是整型,对指针分析没有影响。
在汇编语言中,寄存器和栈都是全局可见的。将Env设置成全局数据,能让任何Lifted-IR对Env的修改都是全局可见的,可以非常直观地模拟汇编指令对机器状态的访问。但这样会使指针分析的精度下降。如图7(a)所示,程序中2段完全独立的内嵌汇编将Rax寄存器中的值分别写入了指针类型的全局数据global_a和global_b中。当这2段内嵌汇编被提升后,就变成了分别将全局数据globalEnv.Rax的值写入global_a和global_b中,为了便于理解,图中使用C语言代替LLVM IR来描述。这将导致静态程序分析工具误认为global_a和global_b具有相同的指向集,存在指针别名关系。
LASM将模拟通用寄存器的Env设置成局部数据,即局部Env(local_Env)。Lifted-IR中函数的原型则被设计成为无返回值,且有一个局部Env指针参数,即void @lifted_func(%local_Env* %local_env)。同时,为了支持Linux内核,将段寄存器、DR寄存器和CR寄存器等设置为全局数据,即全局Env(global_Env)。引入局部Env后,每个内嵌汇编片段都使用各自私有的local_Env,将local_Env中的值写入了指针类型的变量不会导致指针传播的范围被扩大,如图7(b)所示。局部Env的设计也便于LASM在将来支持多线程程序。
LASM在对汇编文件进行解析时,将数据段切分成一个个小单元。汇编使用标签绑定数据,标签名可以看作是C语言中的变量名。数据在汇编文件中的排列顺序和它在内存中的布局是对应的。汇编中有2种常见的定义和初始化数据的方式:一种是使用数据类型和常量;另一种是使用数据类型和标签名,如图8(b)所示。后一种对应C代码中指针类型的数据。汇编代码通过标签访问数据,当被访问的数据是数组的元素或者结构体的域时,则通过标签加偏移量的方式访问,如图8(d)所示。把汇编进一步编译成二进制文件,并将其数据段在LLVM IR上表示为全局数组是一种相对简单的数据提升方法。二进制文件数据段中的数据表示形式是单一的,代码通过偏移或绝对地址访问数据。在LLVM IR上将绝对地址或偏移映射成对上述全局数组的访问就能模拟汇编访问全局数据的语义。但这种提升方法将所有全局数据视为一个整体,对细粒度的静态程序分析不利。
为了支持汇编数据的定义和访问方式,同时更好地支持静态程序分析工具,LASM将汇编中的数据分块提升为结构体类型。汇编中的标签是其数据定义的开始,因此,LASM以标签为分割点,将数据区中定义的数据切分成数据块,每一个数据块都将被提升成LLVM IR中的结构体类型。汇编中使用常量初始化的数据被提升成IR后,也使用对应的常量值进行初始化。使用标签名初始化的数据,提升后则引用该标签对应的IR结构体数据进行初始化。图8(b)所示的数据会被分割成5个数据块。标签int_array和标签global_int之间的数据构成其中的一个数据块,该数据块被提升后得到如图8(e)所示的全局结构体@int_array。该结构体有2个域,分别被初始化为1和2。汇编中的数据ptr则被提升成全局结构体@ptr,并引用了@global_int进行初始化。
汇编指令的操作数有3类:立即数、寄存器、和内存。LASM在模拟了硬件执行环境和提升了全局数据后,就能使用LLVM IR模拟汇编指令的语义。汇编指令对硬件资源的操作被模拟成对Env的操作,对全局数据的操作被模拟成操作提升得到的结构体数据。汇编代码的程序状态可以建模为
$ S=\left(R,flags,mem\right) \text{,} $
其中R为寄存器状态,为了方便描述,把标志位寄存器单独建模为flags,mem为内存状态。提升为LLVM IR后,程序状态可以建模为
$ T\left(S\right)=\left(E.R,E.flags,mem\right) \text{,} $
其中E为Env类型的对象,用于模拟硬件环境状态,E.R用于模拟寄存器状态R,E.flags用于模拟标志位寄存器状态flags。在2个程序状态模型中,mem均表示堆、栈和全局数据区的内存。LASM在Lifted-IR上使用软件栈E.Stack模拟汇编层的硬件栈。全局数据区的数据则被提升为Lifted-IR上的全局变量。显然状态T(S)是汇编程序状态S在LLVM IR上的映射。若1条汇编指令执行后,程序状态从S转移至S',LASM要做的则是使用LLVM IR指令实现程序状态T(S)到T(S')的转移。
汇编中整型的二元算术运算可以抽象为取源操作数和目的操作数、运算求值、运算结果存入目的操作数和更新标志位等步骤,使用通用的大步语义框架将其描述为
$ \frac{\begin{array}{c}val\_ dest=read(S,dest)\\val\_ src=read(S,src)\\result=OP(val\_ dest,val\_ src)\\flags'=update\_ flags(OP,val\_ dest,val\_ src,result)\end{array}}{\langle OP\;dest,src,S\rangle \Downarrow {S}^{\prime}[dest\mapsto result,flags\mapsto flag{s}^{\prime}]} 。 $
在Lifted-IR上被模拟为
${ \dfrac{\begin{array}{c}val\_ dest=read(T\left(S\right),dest)\\val\_ src=read(T(S),src)\\result=OP(val\_ dest,val\_ src)\\flags'=update\_ flags(OP,val\_ dest,val\_ src,result)\end{array}}{\langle OP\;dest,src,T(S)\rangle \Downarrow T({S}^{\prime})[dest\mapsto result,E.flags\mapsto flag{s}^{\prime}]}}。 $
其中函数read表示读取操作数的值。操作符OP表示add(加)、sub(减)、mul(乘)、div(除)等二元算术运算操作。不同的运算可能需要更新不同的标志位,使用函数update_flags进行描述,该函数的行为与指令手册保持一致。在汇编上,读取立即数、寄存器和内存操作数的语义可分别描述为
$ read(S,imm)=imm \text{,} $
$ read\left(S,reg\right)=R\left(reg\right) \text{,} $
$ read(S,mem,addr)=mem\_ load(S,addr,size) 。 $
在Lifted-IR上被模拟为
$ read(T\left(S\right),imm)=imm \text{,} $
$ read\left(T\left(S\right),reg\right)=E.R\left(reg\right) \text{,} $
$ read(T\left(S\right),mem,addr)=mem\_ load(T\left(S\right),addr,size) 。 $
操作符OP在汇编和Lifted-IR上的语义是完全等价的。以64位算术运算为例,加、减、乘、除4种二元算术运算操作的语义可分别描述为
$ \frac{dest=v1\;src=v2}{\langle \text{add}\;dest,src,\delta \rangle \Downarrow {\delta }^{\prime}[dest\mapsto (v1+v2)\;\mathrm{mod}\;{2}^{64}]} \text{,} $
$ \frac{dest=v1\;src=v2}{\langle \text{sub}\;dest,src,\delta \rangle \Downarrow {\delta }^{\prime}[dest\mapsto (v1-v2)\;\mathrm{mod}\;{2}^{64}]} \text{,} $
$ \frac{dest=v1\;src=v2}{\langle \text{mul}\;dest,src,\delta \rangle \Downarrow {\delta }^{\prime}[dest\mapsto (v1\times v2)\;\mathrm{mod}\;{2}^{64}]} \text{,} $
$ \frac{dest=v1\;src=v2\;src\neq 0}{\langle \text{div}\;dest,src,\delta \rangle \Downarrow {\delta }^{\prime}[dest\mapsto (v1/v2)\;\mathrm{mod}\;{2}^{64}]} 。 $
当运算发生在汇编代码中时,δ和δ'分别表示S和S',发生在Lifted-IR上时则分别表示T(S)和T(S')。
函数update_flags根据OP操作的运算结果以及该操作更新标志位寄存器的规则更新S[flags]和T(S)[E.flags]。在汇编和Lifted-IR上,相同的操作将使用完全一样的标志位置位规则。不同之处在于更新的对象不同,汇编指令更新的是标志位寄存器,而Lifted-IR更新的是E中模拟的标志位寄存器。显然,当汇编和Lifted-IR分别在S和T(S)状态下对相同的操作数执行相同的算术运算OP后,将得到相同的运算结果和相同的标志位置位结果,即分别得到新的状态S'和T(S')。对于其他的汇编算术运算指令,LASM也能通过类似的方法进行等价模拟。
数据传送的操作可以分为2类:一类是向寄存器传送数据;另一类是向内存传送数据。汇编代码中内存访问的SIB寻址语义可以描述为
$ \frac{addr=R(base)+R(index)\times scale+disp}{S\xrightarrow{calc\_ addr}S[temp\_ addr\mapsto addr]} 。 $
在Lifted-IR上则被等价模拟为
$ \frac{addr=E.R(base)+E.R(index)\times scale+disp}{T(S)\xrightarrow{calc\_ addr}T(S)[temp\_ addr\mapsto addr]} 。 $
汇编上向寄存器和内存中传送数据的语义可以描述为
$ \frac{v=read(S,src)\;src\;{{\mathrm{is}}}\;{i}mm,{r}eg,{{\mathrm{or}}}\;mem}{\langle \text{mov}\;src,R(reg),S\rangle \Downarrow {S}^{\prime}[R(reg)\mapsto v]} \text{,} $
$ \frac{v=read(S,src)\;addr\;\text{is valid,}{s}rc\;{{\mathrm{is}}}\;{i}mm\;{{\mathrm{or}}}\;reg}{\langle \text{mov}\;src,addr,S\rangle \Downarrow {S}^{\prime}[mem(add\mathrm{r})\mapsto v]} 。 $
在Lifted-IR上则被等价模拟为
$ \frac{v=read(T(S),src)\;src\;{{\mathrm{is}}}\;{i}mm,reg,{{\mathrm{or}}}\;mem}{\langle \text{store}\;src,E.R(reg),T(S)\rangle \Downarrow T({S}^{\prime})[E.R({r}eg)\mapsto v]} \text{,} $
$ \frac{v=read(T(S),src)\;addr\;\text{is valid,}{s}rc\;\text{is}\;{i}mm\;{{\mathrm{or}}}\;reg}{\langle \text{store}\;src,addr,T(S)\rangle \Downarrow T({S}^{\prime})[mem(add\mathrm{r})\mapsto v]} 。 $
可以看到,通过LLVM IR算术运算指令和访存指令的组合,可以实现对汇编的内存寻址和数据传送指令的等价模拟。
以图9所示的代码为例,汇编代码的第3行将立即数6写入Edi寄存器,被提升成Lifted-IR的第2行,将立即数6写入env.edi中。同时,汇编指令的隐式操作也会被LASM模拟,图9中第3行Lifted-IR模拟汇编指令callq将返回地址压到栈上的隐式操作。
LLVM IR以函数的形式组织指令。LASM将汇编代码切分成LiftBlock,并将每个LiftBlock都提升成LLVM IR中的函数。跳转指令、函数调用指令和函数返回指令是一个LiftBlock的结束指令,标志着当前LiftBlock的结束。这些指令的下一条指令则是另一个LiftBlock的起始指令。标签是跳转指令和函数调用指令的目标,它标志着前一个LiftBlock的结束和新LiftBlock的开始。标签后的第1条指令是新LiftBlock的起始指令。如图9所示,左边的14行汇编代码被切分成5个LiftBlock,以标签asm_func开头的第1个LiftBlock被提升成LLVM IR函数void @asm_func(%ENV* %env)。将汇编代码切分成LiftBlock之后,LASM使用LLVM IR的call指令模拟汇编中跳转指令、函数调用指令和函数返回指令的语义,实现控制流转移。
汇编指令jmp和jcc的语义可描述为
$ \frac{addr\;\text{is valid}}{\langle \text{jmp}\;addr,S\rangle \Downarrow {S}^{\prime}[R(pc)\mapsto addr]} \text{,} $
$ \frac{cond(R[flags])=\text{true}\;addr\;\text{is valid}}{\langle \text{jcc}\;addr,S\rangle \Downarrow {S}^{\prime}[R(pc)\mapsto ad{d}r]} \text{,} $
$ \frac{cond(R[flags])=\text{false}\;add{r}_{\text{next}}\;\text{is valid}}{\langle \text{jcc}\;addr,S\rangle \Downarrow {S}^{\prime}[R(pc)\mapsto add{r}_{\text{next}}]} 。 $
跳转指令的核心语义是修改pc的值。LASM使用LLVM IR的call指令等价模拟jmp指令,使用br和call指令的组合等价模拟jcc指令:
$ \frac{addr\;\text{is valid}}{\langle \text{call}\;addr,T(S)\rangle \Downarrow T({S}^{\prime})[E.R(pc)\mapsto addr]} \text{,} $
$ \frac{cond(E.R[f{l}ags])=\text{true}\;\mathrm{\% }\text{t}\colon {{\mathrm{call}}}\;{a}ddr}{\langle \text{br i1}\;cond,\mathrm{\% }\text{t},\mathrm{\% }\text{f};\text{call}\;addr,T(S)\rangle \Downarrow T({S}^{\prime})[E.R(pc)\mapsto addr]} \text{,} $
$ \frac{cond(E.R[f{l}ags])=\text{false}\;\mathrm{\% }\text{f}\colon \text{call}\;{a}dd{r}_{\text{next}}}{\langle \text{br i1}\;cond,\mathrm{\% }\text{t},\mathrm{\% }\text{f};\text{call}\;add{r}_{\text{next}},T(S)\rangle \Downarrow T({S}^{\prime})[E.R(pc)\mapsto add{r}_{\text{next}}]} 。 $
汇编指令jmp和jcc的目标都是label,它是LiftBlock的起始标志。这2条指令还会让LASM将其和其下一条指令切分到2个不同的LiftBlock中。所以汇编指令jcc的目标地址addr和其下一条指令的地址addrnext在Lifted-IR上都对应着一个函数的起始地址。LASM使用LLVM IR的call指令将控制流转移到预期的目标地址上。汇编指令jcc本身的语义就包含了对标志位的判断。但LLVM IR的call指令不具备这一语义,LASM需要使用br指令来模拟jcc指令对标志位的判断。LLVM IR的call指令对E.R(pc)的修改与汇编跳转指令对R(pc)的修改是等价的,同时LASM维持E.Stack不变,因此,S和T(S)上发生的状态转移是等价的。
汇编指令call和ret的语义可描述为
$ \frac{\begin{array}{c}tar\_ addr\;\text{is valid and}\;L\;\text{is}\;len(\text{call inst})\\ret\_ addr=R(pc)+L\\{R}^{\prime}=R\left[rsp\mapsto R(rsp)-8,\;pc\mapsto tar\_ addr\right]\\Me{m}^{\prime}=Mem\left[R(rsp)-8\mapsto ret\_ addr\right]\end{array}}{\langle \text{call}\;tar\_ addr,S\rangle \Downarrow {S}^{\prime}\left[R\mapsto {R}^{\prime}, Mem\mapsto Me{m}^{\prime}\right]} \text{,} $
$ \frac{\begin{array}{c}ret\_ addr=Mem(R(rsp))\\{R}^{\prime}=R[rsp\mapsto R(rsp)+8,pc\mapsto ret\_ addr]\end{array}}{\langle \text{ret},S\rangle \Downarrow {S}^{\prime}[R\mapsto {R}^{\prime}]},$
其核心语义是修改pc和函数调用栈的栈桢。LASM将其模拟为
$ \frac{\begin{array}{c}tar\_ addr\;\text{is the address of the first liftblock in target func}\\ret\_ addr\;\text{is the address of succ}\_\text{liftblock}\\E.{R}^{\prime}=E.R\left[rsp\mapsto E.R(rsp)-8, pc\mapsto tar\_ addr\right]\\Me{m}^{\prime}=Mem\left[E.R(rsp)-8\mapsto ret\_ addr\right]\end{array}}{\langle \text{spush}\;ret\_ addr;\text{call}\;tar\_ addr,T(S)\rangle \Downarrow T({S}^{\prime})\left[E.R\mapsto E.{R}^{\prime}, Mem\mapsto Me{m}^{\prime}\right]} \text{,} $
$ \frac{\begin{array}{c}ret\_ addr=Mem(E.R(rsp))\\E.{R}^{\prime}=E.R\left[rsp\mapsto E.R(rsp)+8,pc\mapsto ret\_ addr\right]\end{array}}{\langle \text{spop}\;ret\_ addr;\text{call}\;ret\_ addr,T(S)\rangle \Downarrow T({S}^{\prime})[E.R\mapsto E.{R}^{\prime}]} , $
其中spush操作表示向软件栈E.Stack中压入数据,在模拟汇编的call指令时,通过该操作完成返回地址入栈的模拟。spop为从软件栈中弹出数据,在模拟汇编的ret指令时需要通过该操作取出返回地址。通过模拟返回地址的入栈和出栈操作,保证模拟执行后T(S')中的E.Stack与S'中硬件栈的状态是等价的。LLVM IR的call指令则等价模拟了控制流转移的语义。
为了支持Linux内核,LASM还对3类特殊的汇编指令做了处理,如表1所示。这3类汇编指令没有对应的LLVM IR指令。第1类是不修改内存和寄存器的汇编指令,它们不会影响静态程序分析。比如特权指令INVLPG只是无效内存页对应的TLB项。第2类是写特定寄存器的汇编指令,LASM模拟其语义,操作相应的模拟寄存器,比如CPUID指令执行后将结果写入Eax,Ebx,Ecx,Edx这4个寄存器中,LASM则将外部数据写入它们对应的模拟寄存器中。第3类是切换执行上下文的指令,LASM将重新初始化Env,并切断数据流的传播。
Lifted-IR和High-IR表达的是不同层级的语义。High-IR中的函数调用遵循API调用约定,有形参和实参的概念,参数和返回值通过符号传递。而汇编语言中的函数调用遵循的是ABI约定,参数和返回值通过寄存器、栈来传递。LASM通过模拟汇编指令的语义来完成汇编代码到LLVM IR的提升。因此High-IR和Lifted-IR并没有因为都使用了LLVM IR的指令集而表达同一层级的语义,如图10所示。
LASM使用胶水函数衔接Lifted-IR和High-IR之间跨代码边界的函数调用,如图11所示。当High-IR调用Lifted-IR的函数时,需要High_To_Low类型胶水函数的辅助,当Lifted-IR调用High-IR中的函数时,则需要Low_To_High类型胶水函数的辅助,以完成参数和返回值的传递。LASM需要为每一个被跨代码边界调用的函数自动生成函数名唯一的胶水函数。生成胶水函数依赖于目标函数的函数原型。LASM通过扫描High-IR发现和搜集函数原型的定义。如果程序中的函数被实现在汇编语言中并被高级语言调用了,那么在High-IR中有该函数的原型声明。反过来,一个函数被实现在高级语言中,被汇编代码调用了,High-IR中有该函数的实现。如果汇编代码调用了库函数,且该库函数未被高级语言调用,那么High-IR中没有该函数的原型声明,需要用户提供该库函数的原型。LASM内置了部分库函数的原型定义。
在获取了函数原型后,LASM根据System-V的ABI调用约定和API调用约定,为调用目标函数设置实参。在生成High_To_Low胶水函数时,首先生成传递参数的代码,将胶水函数的形参的值加载到Env结构体中。假设参数个数为N,当N<6时,将第1~N个参数按ABI约定的顺序加载到Env模拟的参数寄存器中。当N>6时,则将第1~6个参数分别加载到Env中的RDI,RSI,RDX,RCX,R8,R9中,第7~N个参数加载到软件栈上。胶水函数在软件栈上压入模拟的返回地址后,即可调用Lifted-IR上的目标函数F,调用结束后将返回值从Env.Rax中取出,在恢复软件栈栈顶指针后,生成返回到High-IR中的指令。
在生成Low_To_High胶水函数时,也进行类似的操作。不同之处在于,参数传递过程是从Env结构体中取出参数值,并构造对应的实参变量存储参数值,然后调用High-IR中的目标函数F。当函数调用结束后,将返回值存入Env.Rax中。最后模拟汇编指令ret的语义,从软件栈上取出返回地址并调用,以返回到Lifted-IR中。
使用LLVM IR模拟汇编指令语义的代码提升方法能准确完整地表达汇编指令的语义,保证了正确性,但表达的是低级语义,比如通过指针运算实现数组元素的访问。为了更好地支持下游的静态程序分析工具,LASM提供了面向静态程序分析的优化,包括原子指令语义简化和指针运算指令语义提升。这2项优化能让程序中的数据流关系更直观地呈现给静态程序分析工具。优化机制会打破汇编语义的完整性,是可选的。
原子指令语义简化通过使用非原子指令替代原子指令来实现。cmpxchg可以实现对内存的原子性写入。LASM使用非原子的load,cmp,store指令序列来模拟cmpxchg的功能,如图12所示。这种模拟在写内存这一操作上和cmpxchg是一致的,但不具备原子性,对于atomicrmw指令也做了类似的处理。原子操作的指令序列具有图12所示的指令序列模式,LASM采用指令模版匹配的方法识别定位IR上的原子操作序列,并将其替换成非原子操作指令序列。在对数据竞争不敏感的静态程序分析场景下,这项优化能让分析工具获得更准确的值流分析结果。
指针运算指令语义提升通过使用LLVM IR的GetElementPtr指令(简称GEP指令)替换指针运算指令序列来实现。LLVM IR使用GEP指令表达高级语言中访问数组元素和结构体域的语义。但在汇编代码中,往往是使用数组或结构体的基址和偏移量相加的方式来计算访存地址。Lifted-IR则使用IR指令模拟了汇编的这种指针运算。指针运算对静态程序分析工具不友好。LASM使用启发式的方法,将base加offset的指针运算替换成GEP指令。对于Lifted-IR中的add指令,我们先找到其非立即数操作数的类型来源,然后生成GEP指令来替换该指令。如果该操作数源于结构体或者是数组类型,我们通过add指令的立即数操作数计算出指针算术运算是要访问结构体的哪个域,或者是数组的哪个元素,并创建对应的GEP指令。生成GEP指令后,add指令将会被替换。非立即数操作数通常需要经过数层类型转换。它可能是变量或者表达式。如果是变量,则获取其类型;如果是表达式,在获取其类型后还需递归地获取其操作数的类型。
如图13所示,使用GEP替代指针运算后,指令变得更加简洁,没有了指针和整型之间的类型转换,可为静态程序分析工具的指针分析提供数组元素访问的高级语义信息。
本文基于LLVM 10.0.1实现了LASM系统。该系统包含约3.29万行C++代码,可提升x86-64内嵌汇编和汇编文件,现已支持356种汇编指令。为了减小开发量,我们使用C++语言实现了对汇编指令的语义模拟。模拟汇编指令语义的函数被称为语义模拟函数。然后使用Clang将指令的语义模拟函数编译成LLVM IR。在提升汇编指令时,调用语义模拟函数的IR即可。所有语义模拟函数都被赋予了alwaysinline的属性。当一个汇编函数的所有指令都被提升之后,LASM对提升后的代码施加LLVM的内联优化和O2优化选项的其他编译优化机制,将各条指令对应的语义模拟函数内联到一起,起到简化控制流的效果。同时,编译优化也消除了相当一部分模拟eflags寄存器更新的指令。
单个内嵌汇编片段含有的指令数一般都不多,经过内联优化后,提升内嵌汇编得到的Lifted-IR全都会被内联到High-IR中。同时,内嵌汇编中很少有控制流转移指令。因此,内嵌汇编代码被提升后,通常是High-IR调用胶水函数,胶水函数调用Lifted-IR的函数,不会有更深层的函数调用。如图10所示,在胶水函数中LASM会先将函数@Ret_Func的地址压入软件栈中,而Lifted-IR后续从软件栈中取出该函数地址并调用。间接函数调用让控制流变得复杂,在实现时,LASM引入了一个影子栈,专门用于存储函数调用的返回地址,从Lifted-IR返回时变成从影子栈中取返回地址。在提升内嵌汇编的场景中,经过内联优化后,对影子栈的操作都在同一函数内,数据流非常清晰。LASM把从影子栈上取返回地址再进行间接调用的操作改为直接调用函数@Ret_Func,简化了控制流。
LASM能够准确提升汇编代码的语义,并支持下游的静态程序分析工具,增强其在漏洞发现、安全检查等方面的能力。我们设计了2组实验来评估LASM语义提升的正确性和对下游静态分析工具的支持。所有实验均在搭载Intel® Xeon® Gold 6148 2.40 GHz 160核x86 CPU,1.4TB内存,安装了Ubuntu 22.04 64位操作系统的服务器上完成,其他软件环境包括Clang 10.0.1,SVF,CRIX,RetDec,mctoll等。
我们使用提升后再编译执行的方法来评估LASM代码提升的正确性,包含2个实验,测试集信息见表2。一个实验是提升程序的所有代码,测试集为LLVM Test Suite[30]。该实验先将C语言代码编译成汇编代码,再使用LASM将汇编代码提升成Lifted-IR,然后将Lifted-IR编译成可执行文件并执行,通过执行结果是否正确来判断LASM是否正确提升了汇编代码的语义。另一个实验是提升程序的部分代码,用于评估语义融合的正确性,测试集为SPEC CPU 2006[31]中的C语言测试用例。该实验先将一个C语言程序的部分.C文件编译成汇编文件,将其他所有.C文件编译成High-IR,然后使用LASM将汇编文件提升成Lifted-IR,再将High-IR和Lifted-IR融合成Mixed-IR,进而编译成可执行文件并执行。如果执行结果正确,则表明LASM的语义融合是正确的。
LLVM Test Suite是LLVM官方提供的测试套件,用于对LLVM编译器进行测试。该测试套件中的SingleSource测试集包含了众多测试用例。LASM暂不支持浮点指令、向量指令以及弱符号。测试集中包含这些程序特性的测试用例将被排除。经统计,测试集中有175个C语言测试用例能在x86平台上编译运行,且在控制台产生输出,这其中有55个使用了浮点指令或者向量指令,还有1个使用了弱符号。因此,LLVM Test Suite中一共有119个测试用例适合用于LASM的正确性测试。
SPEC CPU 2006测试集由现实世界的复杂应用程序组成,包含了丰富的语法现象,常被用于编译器的正确性测试和编译优化测试。我们选取了SPEC CPU 2006中10个使用C语言实现的测试用例用于测试LASM的语义融合是否正确。
我们通过提升被分析程序中的内嵌汇编代码来评估LASM支持下游静态分析工具的能力。先使用静态分析工具对含有内嵌汇编的测试用例进行分析,得到提升内嵌汇编前的分析结果;然后使用LASM提升测试用例中的内嵌汇编代码;再使用静态分析工具分析对其进行分析,得到提升内嵌汇编后的分析结果。检查对比2份分析结果,分析LASM能否支持下游的静态程序分析工具。
我们还将与二进制代码提升工具进行横向对比,以评估LASM在支持静态程序分析工具分析内嵌汇编上相对它们的优势。这类工具能将二进制文件提升为LLVM IR,在功能上与LASM相似。在该类工具中,RetDec[32]和mctoll[33]是目前对静态程序分析支持最好的2款工具[34]。本文选择这2款工具作为LASM的横向比较对象。我们使用-O0优化选项将测试集的源码编译成二进制文件,然后用RetDec和mctoll将其提升为LLVM IR并交给静态程序分析工具分析,得到分析结果后与LASM的支持情况进行对比。
我们选择SVF Saber[22],CRIX[14]两个开源的静态分析工具来评估LASM对静态分析工具的支持。同时,我们还基于SVF实现了DataProt,并评估LASM对它的支持。DataProt是对Linux kernel全局数据进行分类的静态分析工具,分类的策略类似于文献[35]。SVF Saber的分析对象是SVF Test-Suite[21],而CRIX和DataProt的分析对象是Linux kernel 5.10.112。实验中使用的静态分析工具和被分析程序如表3所示。
SVF Saber简称Saber,是SVF官方提供的基于SVF的静态程序缺陷检测工具,它能分析C语言程序中内存泄漏(memory leak)和重复释放(double free)缺陷。与此同时,SVF还提供了基准测试套件SVF Test-Suite,测试套件中含有47个重复释放测试用例和92个内存泄漏测试用例。测试用例的源码中带有人工标注,提示代码中何处存在缺陷,为测试静态分析工具提供了校验基准。Saber对这些测试用例进行分析后,会根据测试用例中的标记判断分析结果是否正确。跟踪数据流和指针传播是程序缺陷检测流程中的重要环节。Saber无法分析内嵌汇编代码,程序中的内嵌汇编代码会影响它对数据流和指针传播的跟踪。SVF基准测试套件中的测试用例都不包含汇编代码,因此我们将在SVF Test-Suite的内存泄漏和重复释放测试用例中插入内嵌汇编片段。这些内嵌汇编代码具有传播指针的功能。插入内嵌汇编后,分别使用Saber分析SVF Test-Suite的原始测试用例、带内嵌汇编的测试用例,以及经过LASM提升处理的带内嵌汇编的测试用例,通过比较3次分析的结果来评估LASM对Saber的支持情况。如果向测试用例中插入内嵌汇编后Saber无法得到正确的分析结果,但经过LASM的提升处理后,能得到和分析原始测试用例一致的分析结果,则证明LASM能支持Saber分析汇编代码中的指针传播。
CRIX是一个静态分析工具,用于检测Linux kernel对关键变量缺少安全检查的程序缺陷。它只对常见的汇编函数进行了手动建模。我们将在Linux kernel中插入影响数据流的内嵌汇编,这些内嵌汇编无法被CRIX分析到。如果在这些内嵌汇编的影响下,CRIX无法检出原本能检测到的程序缺陷,而使用LASM提升内嵌汇编后,CRIX的检测能力恢复了,就证明LASM能支持CRIX对Linux kernel的分析。
DataProt是我们基于SVF开发的静态分析工具,它能分析Linux kernel对全局数据的读写,并根据kernel对数据的读写发生在kernel运行时的哪个阶段对数据进行分类。Linux kernel的运行分为初始化阶段和初始化后阶段。那些仅在初始化阶段被调用的函数被开发者打上了__init标签。__init是Linux kernel提供的一个宏,被这个宏标记的函数代码会被编译器放置在.init.text段。这个段所占据的内存会在Linux kernel初始化完成后被释放回收。相应地,如果一个全局数据仅在初始化阶段被读,开发者可以给它打上__initconst标签,如果仅在初始化阶段被读写,则可以给它打上__initdata标签。带有__initconst和__initdata标签的数据也会在Linux完成初始化后被释放回收。从Linux kernel 4.6开始,__ro_after_init标签被引入[36],用于标记那些在初始化阶段被读写而在初始化后阶段只会被读的全局数据。通过给Linux kernel的全局数据打上标签,可以将对数据的访问权限限制在最低限度,做到更细粒度的权限管控。但Linux kernel开发者仅对少量数据打上了这些标签。如果能找到更多可以打上标签,但实际未加标签的全局数据,就能让Linux kernel变得更加安全。
DataProt基于SVF的指针分析结果和程序赋值图(program assignment graph,PAG),获取代码对全局数据的读写情况,再根据读写操作发生的阶段对数据进行分类。数据分类必须是保守的,因为错误的分类会导致Linux kernel在运行时崩溃。比如,Linux kernel实际上在初始化阶段和非初始化阶段都对一个数据进行了读写操作,但静态分析将其分类为RoAfterInit类(即初始化后只读),那么当初始化后阶段发生写操作时,内核就会因为向只读内存区域写入数据而发生崩溃。因此,降低DataProt的误报及提升分析精度就变得尤为关键。导致DataProt出现误报的关键原因之一是内核中存在大量内嵌汇编代码,比如原子写操作的实现是通过内嵌汇编实现的。
在实验中我们使用defconfig配置将Linux kernel 5.10.112编译成待分析的LLVM IR。然后分别使用DataProt分析原版的Linux kernel和经过LASM提升处理后的Linux kernel,并对分析结果进行人工校验,以评估LASM对DataProt的支持情况。如果经过LASM处理后,DataProt的误报减少了,则证明LASM能支持DataProt对Linux kernel的分析。
以LLVM Test Suite为测试集的提升后再编译执行实验结果如表4所示。所有测试用例的汇编代码均能被LASM提升为LLVM IR,且都能再被编译成可执行文件,经提升再编译得到的119个可执行文件中,110个可以正确执行。即LASM正确提升了92.44%的测试用例。其余9个测试用例的输出结果与基准输出不一致。我们对这9个测试用例进行了逐一分析,出错的原因是测试用例中包含了我们暂未支持或未完全支持的语法现象和程序行为,比如多线程程序等,详细分析见表5。实验结果表明,那些LASM已经完全支持的指令和语言特性都被正确处理了。
以SPEC CPU 2006作为测试集,测试LASM语义融合正确性的实验中,我们选择性地将每个测试用例的部分.C文件编译成汇编代码,再对其进行提升处理。被选中的.C文件被称为编译—提升测试文件。
我们遵循以下原则来选择编译—提升测试文件。首先,该文件中必须包含热点函数的实现。所谓的热点函数就是被其他.C文件中的代码调用超过5次。满足这个条件意味着Lifted-IR和High-IR之间有较多跨边界的调用,这种调用需要通过胶水函数。其次,编译—提升测试文件中不能包含浮点指令和向量指令,或者指令操作数包含有XMM等向量寄存器。LASM目前尚未支持这些指令。被选为编译—提升测试文件的.C文件如表6所示。经提升—再编译后,所有SPEC CPU 2006中的测试用例均可正确执行,这表明LASM的语义融合是正确的。同时,所有编译—提升测试文件中的C代码行数总量达到了18518行,也进一步验证了LASM语义提升的正确性。
LASM的设计目标是提升内嵌汇编代码以辅助静态分析。表5所列的LASM不支持或部分支持的语言特性,对提升内嵌汇编几乎不构成影响。使用内嵌汇编实现复杂的功能逻辑非常容易出错,会增大软件的开发、调试和维护难度,推高研发成本。哪怕在内嵌汇编中只调用了库函数printf,也容易出现微妙且不易排查的错误[37]。因此,开发人员会尽力避免在内嵌汇编中实现复杂的功能逻辑和使用复杂的语言特性[26]。在本文的实验中,被提升的内嵌汇编代码均未使用__attribute__和#pragma等特性,也未调用atexit,setjump和变参函数。LASM暂不支持或不完全支持的特性几乎不会出现在内嵌汇编代码中。因此,LASM是否正确提升了单条指令,以及是否正确生成了的胶水函数,才是实现其设计目标的关键。
在SVF Test-Suite的内存泄漏和重复释放2组测试用例中插入影响数据流的内嵌汇编后,Saber对每个测试用例的分析表现都变差了。插入内嵌汇编前,Saber能检测到的内存泄漏和重复释放缺陷,在插入能影响该缺陷数据流的内嵌汇编后就无法检测到该缺陷的存在。在经过LASM的代码提升处理后,Saber对所有测试用例的检测结果和插入内嵌汇编前是一致的。实验结果表明,LASM能消除测试用例中的内嵌汇编对Saber的副作用,让它能跟踪程序中完整的数据流。
下面以测试用例df0.c为例,分析LASM如何帮助Saber分析内嵌汇编中的数据流。测试用例df0.c的代码图14(a)所示,代码存在重复释放缺陷。程序的第2行代码让指针i指向了动态开辟的内存,随后在第4行通过内嵌汇编将指针i赋值给指针ptr,最后在第5行和第6行分别释放了指针i和ptr指向的内存。显然,指针ptr和i指向的是同一块内存,第6行代码是对该内存的重复释放。
图14(b)是编译图14(a)代码得到的LLVM IR,其中的第2~6行IR将指向动态内存的指针存到了变量%i中。第8行是1条call asm指令,对应图14(a)中第4行的内嵌汇编。这条call指令的参数是虚拟寄存器%1,它是指向动态内存的指针,返回值存到了虚拟寄存器%2中。因为Saber无法分析第8行代码,所以它无法在虚拟寄存器%1和虚拟寄存器%2之间建立起正确的数据流关系,进而无法分析出在代码执行完第9行后,变量%i和%ptr存储的是指向同一块动态内存的指针。所以Saber无法分析出第13行代码是对该内存的重复释放。显然,Saber不能检测到重复释放程序缺陷,是因为在它无法完整跟踪%i → %1 → %2 → %ptr → %4的数据流传播链。第8行代码中的内嵌汇编让Saber无法建立%1和%2之间数据流关系。
使用LASM对图14(b)所示代码进行提升后,得到了图14(c)所示的Mixed-IR。可以看到,IR中已经没有了内嵌汇编,Saber能分析其中的每一条指令的语义。图14(c)的第3行完成了动态内存申请,并将内存首地址存入虚拟寄存器%call中,第4行将%call的值赋值给虚拟寄存器%1,并在第32行通过%1完成对内存的第1次释放操作。第2行代码创建了一个局部Env结构用于模拟硬件环境。第5~30行代码是LASM提升内嵌汇编得到的IR指令,已经被内联到了函数@main中。其中,第17行模拟的是将函数第1个参数传递给Rdi寄存器。第3,18,30,31,33行完成重复释放操作的数据流传播,即%call → %RAX.i → %15 → %16。图14(c)的代码是经过编译优化得到的。图14(b)第8行代码调用内嵌汇编的语义是将第1个参数的值作为返回值。被优化前的Lifted-IR数据流应该是%call → %Env.RDI → %Env.Rax,被优化成了%call → %Env.Rax。经过优化之后,数据流关系变得更加清晰了。Saber可以检测跟踪上述数据流,并分析出%1和%16是指针别名,所以能检测出第33行的重复释放缺陷。
通过上述分析可以看出,程序中的内嵌汇编被LASM提升为LLVM IR后,原本在IR层断裂的数据流被衔接上了。实验结果表明LASM能支持Saber检测和跟踪内嵌汇编代码中的数据流,帮助它获得程序完整的数据流信息,从而发现程序中的安全缺陷。
作为对比,我们先将插入了内嵌汇编的内存泄漏和重复释放测试用例编译成可执行文件,然后分别使用二进制代码提升工具RetDec和mctoll将其提升为LLVM IR,再使用Saber对其进行检测。实验结果显示,在2个测试集上,一部分测试用例经RetDec提升后,其中的安全缺陷能被Saber检测到。但仅有个别测试用例经mctoll提升后,其中的安全缺陷能被Saber检测到。这一结果和文献[34]的实验结果相互印证。
使用-O0编译优化选项将源码文件df0.c(如图14(a)所示)编译成二进制文件并进行反汇编,其中函数main的汇编代码如图15(a)所示。RetDec提升df0.c含调试信息的二进制文件,得到如图15(b)所示的LLVM IR,Saber能检测到其中存在重复释放安全缺陷。用它提升不含调试信息的二进制文件,则得到如图15(c)所示的IR,它将函数@DOUBLEFREEMALLOC,@DOUBLEFREE,@SAFEFREE的原型推断错了,进而导致了Saber的检测失败。使用mctoll进行提升,得到如图15(d)所示的IR,Saber无法检测到其中的安全缺陷,主要原因是存在指针和整型之间的强制类型转换,以及@DOUBLEFREE和@SAFEFREE的函数原型推测错误。mctoll的提升结果不受调试信息影响。
在深入分析所有测试用例后发现,二进制代码被RetDec和mctoll提升后,程序的缺陷能否被Saber检测到的最关键因素是这2个工具本身。所以我们将原始的仅包含C语言代码的SVF Test-Suite编译成二进制文件进行实验,排除插入的内嵌汇编的干扰。
大量测试用例经RetDec提升后,其包含的安全缺陷无法被Saber检测到。导致Saber检测失败的原因包括错误的代码提升、指针和整型之间的强制类型转换、过于复杂的控制流、冗余的双层条件判断等,如表7所示。RetDec使用连续的2条LLVM IR指令icmp来表达汇编上cmp+jne的条件分支语义,本文称之为冗余的双层条件判断。冗余的icmp指令可被LLVM的编译优化消除。Saber在优化后的IR上能得到正确的检测结果。在将测试集编译成二进制代码时,如果不使用-g选项生成调试信息,经RetDec提升后,Saber在2个测试集上均无法得到正确的检测结果。
使用mctoll提升测试集的二进制代码后,Saber在重复释放测试集中没有正确的检测结果;在内存泄漏测试集上,Saber虽然正确检测了12个测试用例,但可以认为这些都是无效的检测。因为这些测试用例都仅包含从未释放缺陷,而Saber对所有测试用例都只报告该缺陷。在LASM的实验中,我们在仅含有从未释放缺陷的测试用例中使用内嵌汇编来调用动态申请内存的函数。因此,经LASM提升后,Saber能正确检测到缺陷就表明内嵌汇编被正确提升了。
为了测试LASM对CRIX的支持情况,我们先用CRIX分析Linux kernel 5.10.112,在其分析报告中随机选择了10个安全检查缺失的关键数据,并插入内嵌汇编影响与之相关的数据流。插入内嵌汇编的.C文件和函数以及CRIX的检测结果如表8所示。CRIX直接分析插入了内嵌汇编的Linux kernel无法找到这10处程序缺陷,而使用LASM将这些插入的内嵌汇编代码提升为LLVM IR之后,CRIX能摆脱内嵌汇编的干扰,成功将这10处程序缺陷检查出来。
我们以drm/drm_memory.c文件中插入的内嵌汇编代码为例,分析LASM如何支持CRIX检测内嵌汇编中的数据流。如图16所示,插入的内嵌汇编代码位于图16(a)的第6~10行,用于调用函数ioremap_wc,其功能等价于被注释的第5行代码。如果使用高级语言调用该函数,CRIX能检测到其返回值需要进行安全检查。内嵌汇编代码未被LASM提升的LLVM IR如图16(b)所示,CRIX通过分析其中的第9和10这2行代码得到的信息是:虚拟寄存器%7是call asm指令的返回值,随后它被赋值给了虚拟寄存器%handle4。但CRIX无法分析出保存在%7中的值是通过调用函数ioremap_wc产生的。因此,它无法做出是否应该对%handle4进行检查的判断。
用LASM提升内嵌汇编代码后得到如图16(c)所示的代码,其中的第4~29行代码模拟内嵌汇编调用函数ioremap_wc的语义,并将返回值存入虚拟寄存器%handle4中,该虚拟寄存器中存放的是指向变量map->handle的指针。经过代码提升后,CRIX就能检测到代码中的完整数据流了。实验结果表明,在LASM的支持下,CRIX跨越了内嵌汇编带来的数据流跟踪障碍。
作为对比,我们分别使用RetDec和mctoll联合CRIX对内核进行检测。但这2个工具均无法提升内核的二进制文件。二者均在运行过程中发生崩溃,未能生成对应的LLVM IR。
DataProt通过分析Linux kernel对全局数据的读写,根据代码在kernel的初始化阶段和初始化后阶段对数据的读写情况,将数据分成5类,类别如表9所示。不同类别对数据的访问限制的程度是不一样的。比如属于Data类的数据可以在Linux kernel的初始化阶段和初始化后阶段被读和写,相当于没有限制。InitConst类别则限制数据只能在初始化阶段被读,对数据的访问限制是最强的。如果DataProt通过静态分析判断一个数据可以被划分到比它原来所属类别具有更强读写限制的类别中,就意味着DataProt找到了一个可以被保护的数据。实验中使用Clang 10.0.1将defconfig配置的Linux kernel 5.10.112编译成LLVM IR。在使用LASM提升内嵌汇编前后,我们2次使用DataProt对内核进行分析,得到2份分类结果,并人工逐一确认了每个数据是否被正确分类。
2次分类的情况对比如图17所示,上方的实线段表示在LASM的支持下DataProt对数据的分类结果,下方的虚线段表示仅使用DataProt进行分类的结果,2条线段的重叠部分表示在2次分类中都被标记的数据。实验表明,没有LASM的支持下,DataProt找到1886个可保护数据,其中被错误分类的数据有237个,即精度为87.43%(1649/1886)。在LASM的支持下,可以找到1994个可保护数据,被错误分类的数据有90个,即精度为95.49%(1904/1994)。需要注意的是,这90个数据在有和没有LASM支持的情况下,DataProt的分析结果是一样的。有了LASM的支持后DataProt的分析精度提高了8.06个百分点。对比是否有LASM支持的2份分类结果可以看到,在LASM的支持下,有147个数据的分类错误被纠正了,占其错误分类总数量的62.03%(147/237)。同时它还能帮助DataProt多找到了244个可保护数据,经人工分析确认,分类结果都是正确的。即在LASM的帮助下, DataProt多找到了14.80%的可保护数据,且没有引入错误的分类结果。
我们以Linux kernel中的数据atomic_t dm_global_event_nr为例,分析LASM对DataProt的支持。没有LASM支持时,DataProt将dm_global_event_nr分类为Const类,即没有检测到任何对该数据的写操作。但实际上函数void dm_issue_global_event(void)对它有写操作。如图18(a)的C代码所示,代码以dm_global_event_nr的地址为实参调用了函数atomic_inc。函数atomic_inc则通过内嵌汇编实现了原子写操作,如图18(b)所示。函数dm_issue_global_event不带__init标签,意味着它在初始化后阶段被调用。因此,它对dm_global_event_nr的写操作发生在初始化后阶段,应该将dm_global_event_nr划分到Data类。
函数dm_issue_global_event的LLVM IR代码如图18(c)所示。因为DataProt无法分析其中内嵌的汇编代码,所以检测不到该函数对数据dm_global_event_nr的写操作。使用LASM提升内嵌汇编代码后得到的IR代码如图18(d)所示。LASM对提升内嵌汇编得到的IR做了面向静态分析的优化,简化了原子操作的语义,让数据流更精简。同时,编译优化还将模拟incl指令更新eflags寄存器的指令消除了。图18(d)中第2~4行代码完成了对dm_global_event_nr的写操作,这3行IR的语义很容易被DataProt分析,数据流非常清晰,所以它能把数据dm_global_event_nr正确分类为Data类。
在通过静态程序分析对Linux kernel的全局数据进行分类的实验中,LASM帮助分析工具分析和跟踪内嵌汇编中的数据流,减少了误报。在所有的静态程序分析中,跟踪被分析程序的数据流都是一项基础性任务。LASM对DataProt的有效支持很大程度上反映了LASM对静态程序分析的支持。同时,鉴于Linux kernel的复杂性,实验在一定程度上说明了LASM具备支持静态程序分析工具分析大型复杂程序的能力。
LASM对程序的改变体现在2个方面。一是在程序中引入了新的数据类型和全局变量。被提升程序和LASM各自定义的全局变量只要不重名,便不会对静态分析造成影响。LASM不修改程序中已有的数据类型定义,仅增加了少量数据类型定义,不影响静态分析工具对程序的分析。二是把内嵌汇编替换成了与其语义等价的Lifted-IR。首先,LASM能正确提升它已经支持的指令,也能正确生成胶水函数。那些LASM暂不支持的语言特性一般不会出现在内嵌汇编中。这意味着Lifted-IR中的数据流和控制流关系是正确的。实验表明,在经过LLVM的编译优化和LASM面向静态分析的优化后,静态分析工具能跟踪Lifted-IR中的数据流。相当于消除了内嵌汇编带来的分析盲区,这对静态分析具有正向的促进作用。
正确的提升与可支持静态分析的提升并不是等价的。假设在某些情况下静态分析工具无法跟踪Lifted-IR中的数据流,那么这部分Lifted-IR和它对应的内嵌汇编一样,成为了分析盲区。对基于LLVM IR的分析工具而言,它此时面临的情况和分析提升前的代码是一样的。这种情况并不会让分析结果比提升内嵌汇编前更差。
全程序分析寻求在静态程序分析中覆盖更多的代码,从而检测和跟踪更完整的数据流和控制流,发现更多潜在的漏洞或安全缺陷。现有的研究可以分为2类:一类是对程序中更多的信息进行建模,为静态分析器提供更多可被分析的语义信息。另一类是改进静态分析器,提高其分析效率,扩大分析规模,或增加对某类复杂语言特性的支持。前者聚焦在程序信息的表示上,后者力求提高静态分析器的处理能力。
WLLVM[38]是一个将程序不同编译模块的IR合并成一个模块的工具,在分析Linux kernel时常常用到。CodeSonar将程序包含的文件编译成抽象表示,然后将各个编译模块合成为全程序模型,并在此基础上进行全程序分析[39]。Quinlan等人[40]提出了一种紧凑精确的全程序AST表示,以完整表示不同编译模块的代码信息,让分析器能检测C++程序中的ODR(one-definition rule)安全缺陷。实现世界的复杂软件往往有多个组成部分,除了实现程序功能的代码,还包括外部库、开发框架的代码以及配置文件等。将软件的不同组成部分纳入分析中能获得更高的分析精度。例如,在分析基于Spring和安卓等框架开发的程序时,将程序中的XML等配置文件纳入分析,或者将框架代码和应用程序的代码结合起来分析,能提升分析精度[41-43]。增加对语言的动态属性的支持,可以帮助静态分析器发现更多函数调用,建立更完整的函数调用图,显著提升分析结果[44-45]。
很多研究致力于改进静态分析器的算法或数据结构,实现更加高效的分析,让分析器能分析更大规模的代码[46-49],实现对整个程序的静态分析。静态分析需要消耗庞大的计算资源,Garbervetsky等人[50]实现了分布式的程序分析框架,通过增加计算资源来扩大分析器的输入规模。Schubert等人[25]则通过将分析模块化和组合化来加速分析过程。K-Miner以系统调用接口为切入点,对内核进行划分来减少单次分析规模,并复用中间分析结果来完成对整个Linux kernel的分析[51]。
LASM与上述工作是正交的,与下游静态分析工具之间是解耦的,通过在静态分析器的输入中融入内嵌汇编代码的语义信息,让它能捕捉到程序中更多的控制流和数据流信息,实现对C/C++和汇编混合编程的软件进行全程序分析。
内嵌汇编是全程序分析的一大阻碍。目前缺乏通用且高效的面向全程序分析的内嵌汇编代码处理方案。TINA[3]可将内嵌汇编代码转换成C语言代码,让面向C代码的形式化验证工具能处理内嵌汇编。Inception[52]则将嵌入式程序中的ARM平台内嵌汇编代码转成LLVM IR,让符号执行引擎KLEE能处理整个程序。这2个工具的设计思想和LASM相似,都是将内嵌汇编代码转换成更高级的代码表示,并且与程序中原始的高级代码相融合。但面向的应用场景和目标不一样,实现方法也有明显区别。kCPA[53]在分析Linux kernel时将内嵌汇编转换成更低级的二进制代码,以使用现成的二进制代码分析工具对其进行分析,然后合并二进制代码与高级语言代码的分析结果。这种方法的缺点在于无法在同一种代码表示上完成全程序分析。另一种处理方法是人工对内嵌汇编的语义进行建模,CRIX[14]和LRSan[15]都采用了该方法,缺点是耗时长且容易出错。
反编译是编译的逆过程,它将二进制代码转成高级语言[54-56]。目前最成功的反编译器是Hex-Rays[57],2007年由Ilfak Guilfanov发布,它作为商业软件IDA Pro (interactive disassembler pro)[58]的内置反编译器,已经成为事实上的行业标准[59]。Hex-Rays能够通过语义分析、程序控制流分析、函数边界分析等手段,将汇编代码反编译生成C代码。当前最优秀的开源反编译器是Ghidra[60],由NSA组织开发和维护,于2019年向公众开源。Ghidra的反编译过程包含一系列的代码变换过程,类似于LLVM,它具有不同的前端和后端来处理不同类型的代码[61]。DREAM[59,62],Phoenix[63]则是学术界state-of-the-art的2个反编译器。Phoenix强调反编译的正确性,但引入了很多goto语句,DREAM则强调减少goto语句。反编译技术难以恢复高级语义信息[64],且只能将整个程序都编译成二进制代码后整体反编译,无法有效利用High-IR中的高级语义信息。
LASM的设计目标是让基于LLVM IR的静态程序分析工具能分析程序中的汇编代码,这点与反编译器不同。反编译器以二进制作为输入,从反汇编开始到转换成高级语言,多个环节都存在语义推测,会引入错误。而LASM以汇编代码为输入,通过模拟汇编指令语义的方式进行代码提升,能保证正确性。同时,维持High-IR不变,能更好地支持静态程序分析。
二进制代码提升是将二进制代码转化为某种IR,有多个工具具备此功能[32-33,52,65-74],其中angr[74]将二进制代码提升为VEX IR,McSema[66]等工具将二进制代码提升为LLVM IR。BinRec[68]依赖动态反汇编,目的是维持正确性,缺点在于难以覆盖所有代码。其他几个工具则先通过静态反汇编将二进制代码转成汇编代码,然后进行代码提升。有2种方法将汇编代码提升为LLVM IR。第1种是通过在IR上模拟机器状态的方式将汇编代码提升为LLVM IR,该方法能保证正确性,McSema和BinRec为代表的工具采用了这种方法。RetDec[32]和mctoll[33]则是通过模式匹配等方法推断出高级语义,在提升过程中重建局部变量和恢复函数原型,好处是能生成更简洁的IR,但不能保证正确性。
这些工具都有各自的设计目标和用途。BinRec用于二进制程序加固和二进制重写,关注正确性。Instrew[70]用于动态二进制重写和插桩,执行性能是其最关心的。McSema,mctoll,Rev.ng[72]用于二进制分析。RetDec主要用于逆向工程,提供了反编译工具llvmir2hll。这些工具都没有把支持指针分析等静态程序分析手段作为其首要设计目标,产生的IR并不适合用于静态分析,比如Instrew输出的IR不连续,BinRec将所有代码提升到一个LLVM IR函数中,彻底丧失了原始程序的调用图信息,McSema提升的IR会阻碍SVF的指针分析。RetDec在支持指针分析上略胜于mctoll和McSema,但在SVF测试集上也只能得到数个正确的结果[34]。上述工具除Inception[52]都是将整个二进制文件提升为LLVM IR,C/C++中的高级语义难以被恢复。反汇编、函数原型推测、局部变量重建等环节上的任何错误都会影响到静态分析的精度。如果为了让程序中的汇编代码能被静态分析器分析到,就彻底丢弃编译器生成的High-IR,转而使用通过提升整个二进制文件得到的IR,分析的精度很可能不升反降。Inception为了让KLEE对嵌入式系统固件的符号执行能覆盖到内嵌汇编,做了面向符号执行的代码提升,针对KLEE进行了定制化设计。它以二进制可执行文件作为输入,在IR上将可执行文件的整个数据段表示为一个数组,不利于细粒度的数据流分析。
LASM以支持静态分析为设计目标,在实现上与上述工具的不同之处在于,保留了编译器生成的High-IR,仅仅提升程序中的汇编代码,保证汇编代码提升的正确性,并将2种IR融合在一起。这种技术路线和支持静态程序分析的目标更加契合。
高级语言和汇编语言混合编程被广泛使用,但使用汇编语言编程非常具有挑战性,容易出错,且错误难以被发现和定位。近年来涌现出了大量基于LLVM IR的静态程序分析工具,但这些工具都无法分析程序中的内嵌汇编代码。本文提出和实现了LASM系统,该系统能将软件中的内嵌汇编提升为LLVM IR,并与编译高级语言得到的IR相融合,让基于LLVM IR的静态程序分析工具能对软件进行全程序分析,检测到涉及内嵌汇编的数据流,提升分析的精度,降低误报率。

参考文献 引证文献
排序方式:
1
Anguiano R. Linux kernel mainline 4.9 sloccount. txt [EB/OL]. (2016-12-12)[2024-10-16]. https://gist.github.com/ricardoanguiano/18125b7eb3f26cf83724fb60662bdd2c
2
OpenMathLib. OpenBLAS [EB/OL]. [2024-10-16]. https://github.com/OpenMathLib/OpenBLAS
3
Recoules F, Bardin S, Bonichon R, et al. Get rid of inline assembly through verification-oriented lifting[C]//Proc of the 34th IEEE/ACM Int Conf on Automated Software Engineering (ASE’19). Piscataway, NJ: IEEE, 2019: 577−589
4
Rigger M, Marr S, Kell S, et al. An analysis of x86−64 inline assembly in C programs[C]//Proc of the 14th ACM SIGPLAN/SIGOPS Int Conf on Virtual Execution Environments. New York: ACM, 2018: 84−99
5
Larabel M. Linus Torvalds takes on a performance patch: "I relax by playing with inline assembly" [EB/OL]. (2023-06-27)[2024-10-16]. https://www.phoronix.com/news/Linus-Torvalds-Relax-Inline-ASM
6
Petkov B. [Git pull] x86/misc for 6. 5 [EB/OL]. (2023-06-27)[2024-10-16]. https://lore.kernel.org/lkml/fe807f09-9e4a-52d6-c057-b159bee55510@linux.intel.com/T/
7
Biesheuvel A. [Patch v2] ARM: Avoid literal references in inline assembly [EB/OL]. (2021-12-22)[2024-10-16]. https://lore.kernel.org/linux-arm-kernel/YcN4xJfH5NaPSibU@archlinux-ax161/T/
8
Thomson P. Static analysis: An introduction: The fundamental challenge of software engineering is one of complexity[J]. Queue, 2021, 19(4): 1−13
9
National Aeronautics and Space Administration (NASA). Software engineering and assurance handbook[EB/OL]. [2024-10-16]. https://swehb.nasa.gov/display/SWEHBVC
10
Nichols Jr W R. The cost and benefits of static analysis during development[J]. arXiv preprint, arXiv: 2003.03001, 2020
11
Lattner C, Adve V. LLVM: A compilation framework for lifelong program analysis &amp; transformation[C]//Proc of the 2nd Int Symp on Code Generation and Optimization(CGO 2004). Piscataway, NJ: IEEE, 2004: 75−86
12
Sui Yulei, Xue Jingling. SVF: Interprocedural static value-flow analysis in LLVM[C]//Proc of the 25th Int Conf on Compiler Construction. New York: ACM, 2016: 265−266
13
李广威, 袁挺, 李炼. 开源 CC++ 静态软件缺陷检测工具实证研究[J]. 软件学报, 2022, 33(6): 2061−2081
Li Guangwei, Yuan Ting, Li Lian. Study of state-of-the-art open-source C/C++ static analysis tools[J]. Journal of Software, 2022, 33(6): 2061−2081 (in Chinese)
14
Lu Kangjie, Pakki A, Wu Qiushi. Detecting missing-check bugs via semantic-and context-aware criticalness and constraints inferences[C]//Proc of the 28th USENIX Security Symp (USENIX Security 19). Berkeley, CA : USENIX Association, 2019: 1769−1786
15
Wang Wenwen, Lu Kangjie, Yew Pen-Chung. Check it again: Detecting lacking-recheck bugs in OS kernels[C]//Proc of the 25th ACM SIGSAC Conf on Computer and Communications Security. New York: ACM, 2018: 1899−1913
16
Liu Dinghao, Wu Qiushi, Ji Shouling, et al. Detecting missed security operations through differential checking of object-based similar paths[C]//Proc of the 28th ACM SIGSAC Conf on Computer and Communications Security. New York: ACM, 2021: 1627−1644
17
Wu Qiushi, Pakki A, Emamdoost N, et al. Understanding and detecting disordered error handling with precise function pairing[C]//Proc of the 30th USENIX Security Symp (USENIX Security 21). Berkeley, CA: USENIX Association, 2021: 2041−2058
18
Cifuentes C, Gauthier F, Hassanshahi B, et al. The role of program analysis in security vulnerability detection: Then and now[J]. Computers & Security, 2023, 135: 1−14
19
Bessey A, Block K, Chelf B, et al. A few billion lines of code later: Using static analysis to find bugs in the real world[J]. Communications of the ACM, 2010, 53(2): 66−75
20
Machiry A, Spensky C, Corina J, et al. Dr. Checker: A soundy analysis for Linux kernel drivers[C]// Proc of the 26th USENIX Security Symp (USENIX Security 17). Berkeley, CA : USENIX Association, 2017: 1007−1024
21
SVF-tools. Test-Suite [EB/OL]. [2024-10-16]. https://github.com/SVF-tools/Test-Suite
22
Sui Yulei, Ye Ding, Xue Jingling. Static memory leak detection using full-sparse value-flow analysis[C]//Proc of the 21st Int Symp on Software Testing and Analysis (ISSTA 2012). New York: ACM, 2012: 254−264
23
LLVM-admin Team. The LLVM compiler infrastructure [EB/OL]. [2024-10-16]. https://llvm.org/
24
Sattler F, Böhm S, Schubert P D, et al. SEAL: Integrating program analysis and repository mining[J]. ACM Transactions on Software Engineering and Methodology, 2023, 32(5): 121: 1−121: 34
25
Schubert P D, Hermann B, Bodden E. Lossless, persisted summarization of static callgraph, points-to and data-flow analysis[C]//Proc of the 35th European Conf on Object-Oriented Programming (ECOOP 2021). Dagstuhl, Germany: Schloss Dagstuhl -- Leibniz Zentrum für Informatik, 2021: 2: 1−2: 31
26
Wohlferd D. Reasons you should not use inline asm [EB/OL]. (2016-04-26)[2024-10-16]. https://gcc.gnu.org/wiki/DontUseInlineAsm
27
CVEdetails. com. Vulnerability details: CVE−2024−26706 [EB/OL]. [2024-10-16]. https://www.cvedetails.com/cve/CVE-2024-26706/
28
CVEdetails. com. Vulnerability details: CVE−2023−52874 [EB/OL]. [2024-10-16]. https://www.cvedetails.com/cve/CVE-2023-52874/
29
Recoules F, Bardin S, Bonichon R, et al. Interface compliance of inline assembly: Automatically check, patch and refine[C]//Proc of the 43rd IEEE/ACM Int Conf on Software Engineering (ICSE). Piscataway, NJ: IEEE, 2021: 1236−1247
30
The LLVM Organization. LLVM-test-suite [EB/OL]. [2024-10-16]. https://github.com/llvm/llvm-test-suite
31
The Standard Performance Evaluation Corporation (SPEC). SPEC CPU 2006 [EB/OL]. [2024-10-16]. https://www.spec.org/cpu2006/
32
Avast. RetDec [EB/OL]. [2024-10-16]. https://github.com/avast/RetDec
33
Yadavalli S B, Smith A. Raising binaries to LLVM IR with MCTOLL (WIP paper)[C]//Proc of the 20th ACM SIGPLAN/SIGBED Int Conf on Languages, Compilers, and Tools for Embedded Systems. New York: ACM, 2019: 213−218
34
Liu Zhibo, Yuan Yuanyuan, Wang Shuai, et al. Sok: Demystifying binary lifters through the lens of downstream applications[C]//Proc of the 43rd IEEE Symp on Security and Privacy (SP). Piscataway, NJ: IEEE, 2022: 1100−1119
35
Li Guoren, Zhang Hang, Zhou Jinmeng, et al. A hybrid alias analysis and its application to global variable protection in the Linux kernel[C]//Proc of the 32nd USENIX Security Symp (USENIX Security 23). Berkeley, CA: USENIX Association, 2023: 4211−4228
36
Cook K. Introduce post-init read-only memory [EB/OL]. [2024-10-16]. https://lwn.net/Articles/676145/
37
Petch M. Calling printf in extended inline ASM [EB/OL]. [2025-02-25]. https://stackoverflow.com/questions/37502841/calling-printf-in-extended-inline-asm/37503773#37503773
38
Travitch. whole-program-LLVM [EB/OL]. [2024-10-16]. https://github.com/travitch/whole-program-llvm
39
Verifysoft Technology. CodeSonar―Static code analysis [EB/OL]. [2025-02-25]. https://www.verifysoft.com/en_codesonar.html
40
Quinlan D, Vuduc R, Panas T, et al. Support for whole-program analysis and the verification of the one-definition rule in C++[R]. Livermore, CA: Lawrence Livermore National Lab, 2006
41
Dietrich J, Gauthier F, Krishnan P. Driver generation for Java EE web applications[C]//Proc of the 25th Australasian Software Engineering Conf (ASWEC). Piscataway, NJ: IEEE, 2018: 121−125
42
Arzt S, Rasthofer S, Fritz C, et al. Flowdroid: Precise context, flow, field, object-sensitive and lifecycle-aware taint analysis for Android apps[J]. ACM SIGPLAN Notices, 2014, 49(6): 259−269
43
Blackshear S, Gendreau A, Chang B Y E. Droidel: A general approach to Android framework modeling[C]//Proc of the 4th ACM SIGPLAN Int Workshop on State of the Art in Program Analysis. New York: ACM, 2015: 19−25
44
Chen Miao, Tu Tengfei, Zhang Hua, et al. Jasmine: A static analysis framework for spring core technologies[C]//Proc of the 37th IEEE/ACM Int Conf on Automated Software Engineering. Piscataway, NJ: IEEE, 2022: 1−13
45
Laursen M R, Xu Wenyuan, Møller A. Reducing static analysis unsoundness with approximate interpretation[C]//Proc of the 45th ACM on Programming Languages(PLDI). New York: ACM, 2024: 1165−1188
46
Hardekopf B, Lin C. The ant and the grasshopper: Fast and accurate pointer analysis for millions of lines of code[C]//Proc of the 28th ACM SIGPLAN Conf on Programming Language Design and Implementation. New York: ACM, 2007: 290−299
47
Hardekopf B, Lin C. Flow-sensitive pointer analysis for millions of lines of code[C]//Proc of the 9th Int Symp on Code Generation and Optimization (CGO 2011). Piscataway, NJ: IEEE, 2011: 289−298
48
Yu Hongtao, Xue Jingling, Huo Wei, et al. Level by level: Making flow-and context-sensitive pointer analysis scalable for millions of lines of code[C]//Proc of the 8th annual IEEE/ACM Int Symp on Code Generation and Optimization. Piscataway, NJ: IEEE, 2010: 218−229
49
McPeak S, Gros C H, Ramanathan M K. Scalable and incremental software bug detection[C]//Proc of the 9th Joint Meeting on Foundations of Software Engineering (ESEC/FSE 2013). New York: ACM, 2013: 554−564
50
Garbervetsky D, Zoppi E, Livshits B. Toward full elasticity in distributed static analysis: The case of callgraph analysis[C]//Proc of the 11th Joint Meeting on Foundations of Software Engineering (ESEC/FSE 2017). New York: ACM, 2017: 442−453
51
Gens D, Schmitt S, Davi L, et al. K-Miner: Uncovering memory corruption in Linux[C]//Proc of the 25th Annual Network and Distributed System Security Symp (NDSS). Reston, VA: The Internet Society, 2018: 1−15
52
Corteggiani N, Camurati G, Francillon A. Inception: System-wide security testing of real-world embedded systems software[C]//Proc of the 27th USENIX Security Symp (USENIX Security 18). Berkeley, CA: USENIX Association, 2018: 309−326
53
Yang Yuting, Tu Jinjing, Shen Wenbo, et al. kCPA: Towards sensitive pointer full life cycle authentication for OS kernels[J]. IEEE Transactions on Dependable and Secure Computing, 2023, 21(4): 3768−3784
54
Cifuentes C. Reverse Compilation Techniques[M]. Brisbane: Queensland University of Technology, 1994
55
Cifuentes C, Gough K J. Decompilation of binary programs[J]. Software: Practice and Experience, 1995, 25(7): 811−829
56
Cifuentes C. Structuring decompiled graphs[C]//Proc of the 6th Int Conf on Compiler Construction. Berlin: Springer, 1996: 91−105
57
Hex-rays. Hex-rays decompiler[EB/OL]. [2024-10-16]. https://www.hex-rays.com/products/decompiler/
58
Hex-rays. Ida pro [EB/OL]. [2024-10-16]. https://www.hex-rays.com/products/ida/
59
Yakdan K, Eschweiler S, Gerhards-Padilla E, et al. No more gotos: Decompilation using pattern-independent control-flow structuring and semantic-preserving transformations[C]//Proc of the 22nd Annual Network and Distributed System Security Symp (NDSS). Reston, VA: The Internet Society, 2015: 1−15
60
NationalSecurityAgency. Ghidra [EB/OL]. [2024-10-16]. https://github.com/NationalSecurityAgency/ghidra
61
Toor T S. Decompilation of binaries into LLVM IR for automated analysis[D]. Waterloo: University of Waterloo, 2022
62
Yakdan K, Dechand S, Gerhards-Padilla E, et al. Helping johnny to analyze malware: A usability-optimized decompiler and malware analysis user study[C]//Proc of the 37th IEEE Symp on Security and Privacy (SP). Piscataway, NJ: IEEE, 2016: 158−177
63
Schwartz E J, Lee J H, Woo M et al. Native x86 decompilation using semantics-preserving structural analysis and iterative control-flow structuring[C]//Proc of the 22nd USENIX Security Symp (USENIX Security 13). Berkeley, CA: USENIX Association, 2013: 353−368
64
Liu Zhibo, Wang Shuai. How far we have come: Testing decompilation correctness of C decompilers[C]//Proc of the 29th ACM SIGSOFT Int Symp on Software Testing and Analysis (ISSTA 2020). New York: ACM, 2020: 475−487
65
lifting-bits. Remill [EB/OL]. [2024-10-16]. https://github.com/lifting-bits/remill
66
lifting-bits. McSema [EB/OL]. [2024-10-16]. https://github.com/lifting-bits/mcsema
67
cojocar. Bin2llvm [EB/OL]. [2024-10-16]. https://github.com/cojocar/bin2llvm
68
Altinay A, Nash J, Kroes T, et al. BinRec: Dynamic binary lifting and recompilation[C]//Proc of the 5th European Conf on Computer Systems. New York: ACM, 2020: 1−16
69
GaloisInc. Reopt [EB/OL]. [2024-10-16]. https://github.com/GaloisInc/reopt
70
Engelke A, Schulz M. Instrew: Leveraging LLVM for high performance dynamic binary instrumentation[C]//Proc of the 16th ACM SIGPLAN/SIGOPS Int Conf on Virtual Execution Environments. New York: ACM, 2020: 172−184
71
Repzret. Dagger [EB/OL]. [2024-10-16]. https://github.com/repzret/dagger
72
rev. ng Labs. Revng [EB/OL]. [2024-10-16]. https://github.com/revng/revng
73
fay59. Fcd [EB/OL]. [2024-10-16]. https://github.com/fay59/fcd
74
angr. angr [EB/OL]. [2024-10-16]. https://github.com/angr/angr
2026年第63卷第5期
66
33
0
引用本文
BibTeX
文章信息
doi: 10.7544/issn1000-1239.202440881
  • 接收时间:2024-11-11
  • 首发时间:2026-11-17
  • 出版时间:2026-05-01
补充材料
相关文章
文章信息
作者
出版历史
  • 收稿日期:2024-11-11
  • 修回日期:2026-03-04
基金
作者信息
    1处理器芯片全国重点实验室(中国科学院计算技术研究所) 北京 100190
    2中国科学院大学 北京 100049
    3北京地平线机器人技术研发有限公司 北京 100089
参考文献
分享链接
https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/10.7544/issn1000-1239.202440881
分享至
全文二维码

扫描看全文

引用本文
BibTeX
本文的引用情况
2种不同金属材料的力学参数
科
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
关闭全屏