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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 2ba4c5c8-a1d2-4fdc-b785-77c614e21550Cited 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
- Rely/Guarantee Reasoning for Multicopy Atomic Weak Memory ModelsNicholas Coughlin, Kirsten Winter, Graeme SmithFM 2021 · 16 citations
- SynthCT: Towards Portable Constant-Time CodeSushant Dinesh, Grant Garrett-Grossman, Christopher W. FletcherNDSS 2022
