Lasagne: a static binary translator for weak memory model architectures
Rodrigo C. O. Rocha, Dennis Sprokholt, Martin Fink, Redha Gouicem, Tom Spink, Soham Chakraborty, Pramod Bhatotia
Abstract
The emergence of new architectures create a recurring challenge to ensure that existing programs still work on them. Manually porting legacy code is often impractical. Static binary translation (SBT) is a process where a program's binary is automatically translated from one architecture to another, while preserving their original semantics. However, these SBT tools have limited support to various advanced architectural features. Importantly, they are currently unable to translate concurrent binaries. The main challenge arises from the mismatches of the memory consistency model specified by the different architectures, especially when porting existing binaries to a weak memory model architecture.
In this paper, we propose Lasagne, an end-to-end static binary translator with precise translation rules between x86 and Arm concurrency semantics. First, we propose a concurrency model for Lasagne's intermediate representation (IR) and formally proved mappings between the IR and the two architectures. The memory ordering is preserved by introducing fences in the translated code. Finally, we propose optimizations focused on raising the level of abstraction of memory address calculations and reducing the number of fences. Our evaluation shows that Lasagne reduces the number of fences by up to about 65%, with an average reduction of 45.5%, significantly reducing their runtime overhead.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
10 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- CrossMapping: Harmonizing Memory Consistency in Cross-ISA Binary Translation cites VSync: push-button verification and optimization for synchronization primitives on weak memory models
- AtoMig: Automatically Migrating Millions Lines of Code from TSO to WMM cites VSync: push-button verification and optimization for synchronization primitives on weak memory models
- Polynima: Practical Hybrid Recompilation for Multithreaded Binaries cites What You Trace is What You Get: Dynamic Stack-Layout Recovery for Binary Recompilation
- Polynima: Practical Hybrid Recompilation for Multithreaded Binaries cites AtoMig: Automatically Migrating Millions Lines of Code from TSO to WMM
Cited by top-tier papers10
- Plankton: Reconciling Binary Code and Debug InformationAnshunkang Zhou, Chengfeng Ye, Heqing Huang, Yuandao Cai et al.ASPLOS 2024 · 11 citations
- AtoMig: Automatically Migrating Millions Lines of Code from TSO to WMMMartin Beck, Koustubha Bhat, Lazar Stricevic, Geng Chen et al.ASPLOS 2023 · 9 citations
- What You Trace is What You Get: Dynamic Stack-Layout Recovery for Binary RecompilationFabian Parzefall, Chinmay Deshpande, Felicitas Hetzelt, Michael FranzASPLOS 2024 · 5 citations
- CrossMapping: Harmonizing Memory Consistency in Cross-ISA Binary TranslationChen Gao, Xiangwei Meng, Wei Li, Jinhui Lai et al.USENIX ATC 2024 · 4 citations
- Polynima: Practical Hybrid Recompilation for Multithreaded BinariesChinmay Deshpande, Fabian Parzefall, Felicitas Hetzelt, Michael FranzEuroSys 2024 · 3 citations
Builds on4
- Promising 2.0: global optimizations in relaxed memory concurrencySung-Hwan Lee, Minki Cho, Anton Podkopaev, Soham Chakraborty et al.PLDI 2020 · 48 citations
- VSync: push-button verification and optimization for synchronization primitives on weak memory modelsJonas Oberhauser, Rafael Lourenco de Lima Chehab, Diogo Behrens, Ming Fu et al.ASPLOS 2021 · 40 citations
- Effective function merging in the SSA formRodrigo C. O. Rocha, Pavlos Petoumenos, Zheng Wang, Murray Cole et al.PLDI 2020 · 29 citations
- Verifying observational robustness against a c11-style memory modelRoy David Margalit, Ori LahavPOPL 2021 · 22 citations
Related papers
- Risotto: A Dynamic Binary Translator for Weak Memory Model ArchitecturesRedha Gouicem, Dennis Sprokholt, Jasper Ruehl, Rodrigo C. O. Rocha et al.ASPLOS 2023 · 7 citations
- Arancini: A Hybrid Binary Translator for Weak Memory Model ArchitecturesSebastian Reimers, Dennis Sprokholt, Martin Fink, Theofilos Augoustis et al.ASPLOS 2026 · 1 citation
- No More Translation at Runtime: LLM-Empowered Static Binary TranslationZhibo Liu, Huaijin Wang, Wai Kin Wong, Daoyuan Wu et al.EuroSys 2026 · 1 citation
- Unsupervised Binary Code Translation with Application to Code Clone Detection and Vulnerability DiscoveryIftakhar Ahmad, Lannan LuoEMNLP Findings 2023 · 5 citations
- Rely/Guarantee Reasoning for Multicopy Atomic Weak Memory ModelsNicholas Coughlin, Kirsten Winter, Graeme SmithFM 2021 · 16 citations
