Syscall emulation support in HelenOS
Emulace syscallů v HelenOSu
diploma thesis (DEFENDED)

View/ Open
Permanent link
http://hdl.handle.net/20.500.11956/148818Identifiers
Study Information System: 235328
Collections
- Kvalifikační práce [11322]
Author
Advisor
Referee
Tůma, Petr
Faculty / Institute
Faculty of Mathematics and Physics
Discipline
Software Systems
Department
Department of Distributed and Dependable Systems
Date of defense
13. 9. 2021
Publisher
Univerzita Karlova, Matematicko-fyzikální fakultaLanguage
English
Grade
Excellent
Keywords (Czech)
syscall emulation|HelenOS|POSIXKeywords (English)
syscall emulation|HelenOS|POSIXExistují dva hlavní způsoby jak na jednom operačním systému spustit program určený pro jiný operační systém. Jedním z nich je modifikace samot- ného softwaru či jeho části pro cílové API. Druhý staví na poskytnutí vrstvy kompatibility transparentní z pohledu aplikace, tak aby aplikace nemusela být modifikována. První zmíněné již HelenOS umí, druhé realizujeme v této práci. Práce obsahuje popis binárního rozhraní kernelu a analýzu existujících řešení na Linuxu, Windowsu a dalších systémech. Zároveň popisuje imple- mentaci, která transparentně emuluje syscally. Emulace je implementovaná v userspace, s vyjímkou malé "trampolíny" v kernelu, a běží v kontextu emulo- vané aplikace. Výsledek umožňuje spouštění řady Linuxových utilit včetně GCC na platformě x86_64 v systému HelenOS. 1
There are two main options for running a program intended for one oper- ating system on a different one. We can modify the program to use the API of the new OS. Alternatively, we can provide a compatibility layer in the new OS, transparent to the program, without changing the application. HelenOS ecosystem already allows the first. This thesis focuses on supporting the lat- ter. This thesis describes the kernel binary interface and analyses existing solutions on Linux, Windows, and specialised systems. Then we describe our prototype that transparently traps syscalls and emulates them. The emula- tion is implemented fully in userspace (except for a small kernel trampoline), and its code is executed in the context of the original application. The result allows running some of the unmodified Linux programs (focusing on GCC toolchain) on the x86_64 instance of the HelenOS system. 1