Risotto : a dynamic binary translator for weak memory model architectures
View/ Open
Date
21/12/2022Author
Keywords
Metadata
Show full item recordAltmetrics Handle Statistics
Altmetrics DOI Statistics
Abstract
Dynamic Binary Translation (DBT) is a powerful approach to support cross-architecture emulation of unmodified binaries. However, DBT systems face correctness and performance challenges, when emulating concurrent binaries from strong to weak memory consistency architectures. As a matter of fact, we report several translation errors in QEMU, when emulating x86 binaries on Arm hosts. To address these challenges, we propose an end-to-end approach that provides correct and efficient emulation for weak memory model architectures. Our contributions are twofold: First, we formalize QEMU’s intermediate representation’s memory model, and use it to propose formally verified mapping schemes to bridge the strong-on-weak memory consistency mismatch. Second, we implement these verified mappings in Risotto, a QEMU-based DBT system that optimizes memory fence placement while ensuring correctness. Risotto further improves performance via cross-architecture dynamic linking of native shared libraries and faster yet correct translation of compare-and-swap operations. We evaluate Risotto using multi-threaded benchmark suites and real-world applications, and show that Risotto improves the emulation performance by 6.7% on average over “erroneous” QEMU, while ensuring correctness.
Citation
Gouicem , R , Sprokholt , D , Ruehl , J , Rocha , R , Spink , T , Chakraborty , S & Bhatotia , P 2022 , Risotto : a dynamic binary translator for weak memory model architectures . in T M Aamodt , N E Jerger & M Swift (eds) , Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 1 (ASPLOS 2023) . vol. 1 , ACM , New York, NY , pp. 107–122 , 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS 2023) , Vancouver , Canada , 25/03/23 . https://doi.org/10.1145/3567955.3567962 conference
Publication
Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 1 (ASPLOS 2023)
Type
Conference item
Rights
Copyright © 2022 ACM. This work has been made available online in accordance with publisher policies or with permission. Permission for further reuse of this content should be sought from the publisher or the rights holder. This is the author created accepted manuscript following peer review and may differ slightly from the final published version. The final published version of this work is available athttps://doi.org/10.1145/3567955.3567962
Collections
Items in the St Andrews Research Repository are protected by copyright, with all rights reserved, unless otherwise indicated.