Islaris: verification of machine code against authoritative ISA semantics

Michael Sammler, Angus Hammond, Rodolphe Lepigre, B. Campbell, Jean Pichon-Pharabod, Derek Dreyer, Deepak Garg, Peter Sewell
{"title":"Islaris: verification of machine code against authoritative ISA semantics","authors":"Michael Sammler, Angus Hammond, Rodolphe Lepigre, B. Campbell, Jean Pichon-Pharabod, Derek Dreyer, Deepak Garg, Peter Sewell","doi":"10.1145/3519939.3523434","DOIUrl":null,"url":null,"abstract":"Recent years have seen great advances towards verifying large-scale systems code. However, these verifications are usually based on hand-written assembly or machine-code semantics for the underlying architecture that only cover a small part of the instruction set architecture (ISA). In contrast, other recent work has used Sail to establish formal models for large real-world architectures, including Armv8-A and RISC-V, that are comprehensive (complete enough to boot an operating system or hypervisor) and authoritative (automatically derived from the Arm internal model and validated against the Arm validation suite, and adopted as the official formal specification by RISC-V International, respectively). But the scale and complexity of these models makes them challenging to use as a basis for verification. In this paper, we propose Islaris, the first system to support verification of machine code above these complete and authoritative real-world ISA specifications. Islaris uses a novel combination of SMT-solver-based symbolic execution (the Isla symbolic executor) and automated reasoning in a foundational program logic (a new separation logic we derive using Iris in Coq). We show that this approach can handle Armv8-A and RISC-V machine code exercising a wide range of systems features, including installing and calling exception vectors, code parametric on a relocation address offset (from the production pKVM hypervisor); unaligned access faults; memory-mapped IO; and compiled C code using inline assembly and function pointers.","PeriodicalId":140942,"journal":{"name":"Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation","volume":"142 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-06-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"12","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3519939.3523434","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 12

Abstract

Recent years have seen great advances towards verifying large-scale systems code. However, these verifications are usually based on hand-written assembly or machine-code semantics for the underlying architecture that only cover a small part of the instruction set architecture (ISA). In contrast, other recent work has used Sail to establish formal models for large real-world architectures, including Armv8-A and RISC-V, that are comprehensive (complete enough to boot an operating system or hypervisor) and authoritative (automatically derived from the Arm internal model and validated against the Arm validation suite, and adopted as the official formal specification by RISC-V International, respectively). But the scale and complexity of these models makes them challenging to use as a basis for verification. In this paper, we propose Islaris, the first system to support verification of machine code above these complete and authoritative real-world ISA specifications. Islaris uses a novel combination of SMT-solver-based symbolic execution (the Isla symbolic executor) and automated reasoning in a foundational program logic (a new separation logic we derive using Iris in Coq). We show that this approach can handle Armv8-A and RISC-V machine code exercising a wide range of systems features, including installing and calling exception vectors, code parametric on a relocation address offset (from the production pKVM hypervisor); unaligned access faults; memory-mapped IO; and compiled C code using inline assembly and function pointers.
Islaris:根据权威ISA语义验证机器代码
近年来,在验证大规模系统代码方面取得了很大进展。然而,这些验证通常是基于底层体系结构的手工编写的汇编或机器代码语义,这些语义只覆盖指令集体系结构(ISA)的一小部分。相比之下,最近的其他工作已经使用Sail建立了大型现实世界架构的正式模型,包括Armv8-A和RISC-V,它们是全面的(完整到足以启动操作系统或管理程序)和权威的(自动从Arm内部模型中派生出来,并根据Arm验证套件进行验证,并分别被RISC-V国际采用为官方正式规范)。但是这些模型的规模和复杂性使它们难以作为验证的基础。在本文中,我们提出了Islaris,这是第一个支持在这些完整和权威的现实世界ISA规范之上验证机器码的系统。Islaris使用了基于smt求解器的符号执行(Isla符号执行器)和基础程序逻辑中的自动推理(我们在Coq中使用Iris派生的新分离逻辑)的新颖组合。我们表明,这种方法可以处理Armv8-A和RISC-V机器码执行广泛的系统功能,包括安装和调用异常向量,代码参数的重定位地址偏移(从生产pKVM管理程序);未对齐访问故障;内存映射输入输出;并使用内联汇编和函数指针编译C代码。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信