Cargando…
Synthesizing JIT Compilers for In-Kernel DSLs
Modern operating systems allow user-space applications to submit code for kernel execution through the use of in-kernel domain specific languages (DSLs). Applications use these DSLs to customize system policies and add new functionality. For performance, the kernel executes them via just-in-time (JI...
Autores principales: | , , , , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
2020
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7363179/ http://dx.doi.org/10.1007/978-3-030-53291-8_29 |
_version_ | 1783559618164686848 |
---|---|
author | Van Geffen, Jacob Nelson, Luke Dillig, Isil Wang, Xi Torlak, Emina |
author_facet | Van Geffen, Jacob Nelson, Luke Dillig, Isil Wang, Xi Torlak, Emina |
author_sort | Van Geffen, Jacob |
collection | PubMed |
description | Modern operating systems allow user-space applications to submit code for kernel execution through the use of in-kernel domain specific languages (DSLs). Applications use these DSLs to customize system policies and add new functionality. For performance, the kernel executes them via just-in-time (JIT) compilation. The correctness of these JITs is crucial for the security of the kernel: bugs in in-kernel JITs have led to numerous critical issues and patches. This paper presents JitSynth, the first tool for synthesizing verified JITs for in-kernel DSLs. JitSynth takes as input interpreters for the source DSL and the target instruction set architecture. Given these interpreters, and a mapping from source to target states, JitSynth synthesizes a verified JIT compiler from the source to the target. Our key idea is to formulate this synthesis problem as one of synthesizing a per-instruction compiler for abstract register machines. Our core technical contribution is a new compiler metasketch that enables JitSynth to efficiently explore the resulting synthesis search space. To evaluate JitSynth, we use it to synthesize a JIT from eBPF to RISC-V and compare to a recently developed Linux JIT. The synthesized JIT avoids all known bugs in the Linux JIT, with an average slowdown of [Formula: see text] in the performance of the generated code. We also use JitSynth to synthesize JITs for two additional source-target pairs. The results show that JitSynth offers a promising new way to develop verified JITs for in-kernel DSLs. |
format | Online Article Text |
id | pubmed-7363179 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2020 |
record_format | MEDLINE/PubMed |
spelling | pubmed-73631792020-07-16 Synthesizing JIT Compilers for In-Kernel DSLs Van Geffen, Jacob Nelson, Luke Dillig, Isil Wang, Xi Torlak, Emina Computer Aided Verification Article Modern operating systems allow user-space applications to submit code for kernel execution through the use of in-kernel domain specific languages (DSLs). Applications use these DSLs to customize system policies and add new functionality. For performance, the kernel executes them via just-in-time (JIT) compilation. The correctness of these JITs is crucial for the security of the kernel: bugs in in-kernel JITs have led to numerous critical issues and patches. This paper presents JitSynth, the first tool for synthesizing verified JITs for in-kernel DSLs. JitSynth takes as input interpreters for the source DSL and the target instruction set architecture. Given these interpreters, and a mapping from source to target states, JitSynth synthesizes a verified JIT compiler from the source to the target. Our key idea is to formulate this synthesis problem as one of synthesizing a per-instruction compiler for abstract register machines. Our core technical contribution is a new compiler metasketch that enables JitSynth to efficiently explore the resulting synthesis search space. To evaluate JitSynth, we use it to synthesize a JIT from eBPF to RISC-V and compare to a recently developed Linux JIT. The synthesized JIT avoids all known bugs in the Linux JIT, with an average slowdown of [Formula: see text] in the performance of the generated code. We also use JitSynth to synthesize JITs for two additional source-target pairs. The results show that JitSynth offers a promising new way to develop verified JITs for in-kernel DSLs. 2020-06-16 /pmc/articles/PMC7363179/ http://dx.doi.org/10.1007/978-3-030-53291-8_29 Text en © The Author(s) 2020 Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made. The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. |
spellingShingle | Article Van Geffen, Jacob Nelson, Luke Dillig, Isil Wang, Xi Torlak, Emina Synthesizing JIT Compilers for In-Kernel DSLs |
title | Synthesizing JIT Compilers for In-Kernel DSLs |
title_full | Synthesizing JIT Compilers for In-Kernel DSLs |
title_fullStr | Synthesizing JIT Compilers for In-Kernel DSLs |
title_full_unstemmed | Synthesizing JIT Compilers for In-Kernel DSLs |
title_short | Synthesizing JIT Compilers for In-Kernel DSLs |
title_sort | synthesizing jit compilers for in-kernel dsls |
topic | Article |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7363179/ http://dx.doi.org/10.1007/978-3-030-53291-8_29 |
work_keys_str_mv | AT vangeffenjacob synthesizingjitcompilersforinkerneldsls AT nelsonluke synthesizingjitcompilersforinkerneldsls AT dilligisil synthesizingjitcompilersforinkerneldsls AT wangxi synthesizingjitcompilersforinkerneldsls AT torlakemina synthesizingjitcompilersforinkerneldsls |