Stop Hiding The Sharp Knives: The WebAssembly Linux Interface (2312.03858v1)
Abstract: WebAssembly is gaining popularity as a portable binary format targetable from many programming languages. With a well-specified low-level virtual instruction set, minimal memory footprint and many high-performance implementations, it has been successfully adopted for lightweight in-process memory sandboxing in many contexts. Despite these advantages, WebAssembly lacks many standard system interfaces, making it difficult to reuse existing applications. This paper proposes WALI: The WebAssembly Linux Interface, a thin layer over Linux's userspace system calls, creating a new class of virtualization where WebAssembly seamlessly interacts with native processes and the underlying operating system. By virtualizing the lowest level of userspace, WALI offers application portability with little effort and reuses existing compiler backends. With WebAssembly's control flow integrity guarantees, these modules gain an additional level of protection against remote code injection attacks. Furthermore, capability-based APIs can themselves be virtualized and implemented in terms of WALI, improving reuse and robustness through better layering. We present an implementation of WALI in a modern WebAssembly engine and evaluate its performance on a number of applications which we can now compile with mostly trivial effort.
- Linux test project. https://github.com/linux-test-project/ltp, 2012.
- Wasmcrypto: A WebAssembly set of cryptographic primitives. https://github.com/jedisct1/wasm-crypto, 2018. (Accessed 2021-07-29).
- Webassembly exception handling proposal. https://github.com/webassembly/exception-handling, 2019. (Accessed 2023-8-08).
- The edge of the multi-cloud. https://www.fastly.com/cassets/6pk8mg3yh2ee/79dsHLTEfYIMgUwVVllaa4/5e5330572b8f317f72e16696256d8138/WhitePaper-Multi-Cloud.pdf, 2020. (Accessed 2021-07-06).
- libuvwasi. https://github.com/nodejs/uvwasi.git, 2020. (Access 2023-8-01).
- musl-libc. https://www.musl-libc.org, 2020. (Accessed 2023-8-08).
- Unity: Getting started with WebGL development. https://https://docs.unity3d.com/Manual/webgl-gettingstarted.html, 2020. (Accessed 2021-07-29).
- Unreal Engine: Developing HTML5 games. https://https://docs.unrealengine.com/4.26/en-US/SharingAndReleasing/HTML5/GettingStarted/, 2021. (Accessed 2021-07-29).
- Wasmer: A Fast and Secure Webassembly Runtime. https://github.com/wasmerio/wasmer, 2021. (Accessed 2021-07-06).
- Wasmtime: a standalone runtime for WebAssembly. https://github.com/bytecodealliance/wasmtime, 2021. (Accessed 2021-08-11).
- WebAssembly specifications. https://webassembly.github.io/spec/, 2021. (Accessed 2021-07-29).
- WebAssembly Micro Runtime (WAMR). https://github.com/bytecodealliance/wasm-micro-runtime, 2022. (Accessed 2022-04-11).
- Webassembly multi memory proposal. https://github.com/WebAssembly/multi-memory, 2022. (Accessed 2023-7-13).
- Cve-2023-38408 detail. https://nvd.nist.gov/vuln/detail/CVE-2023-38408, 2023. (Accessed 2023-08-9).
- Control-flow integrity principles, implementations, and applications. 13(1), nov 2009.
- Firecracker: Lightweight virtualization for serverless applications. In 17th USENIX symposium on networked systems design and implementation (NSDI 20), pages 419–434, 2020.
- Wine. Linux Journal, 1994(4es):3–es, 1994.
- Isa semantics for armv8-a, risc-v, and cheri-mips. Proc. ACM Program. Lang., 3(POPL), jan 2019.
- OpenVZ Authors. OpenVZ FAQ. https://wiki.openvz.org/FAQ, 2014. (Accessed 2023-8-08).
- WASI authors. Wasi: The webassembly system interface. wasi.dev, 2023. (Accessed 2023-8-08).
- Wasmer authors. Wasix: The superset of WASI. wasix.org, 2023. (Accessed 2023-8-08).
- A quantitative cross-comparison of container networking technologies for virtualized service infrastructures in local computing environments. Transactions on Emerging Telecommunications Technologies, 32(4):e4234, 2021.
- Fabrice Bellard. Qemu: A generic and open source machine emulator and virtualizer. http://qemu.org, 2020. (Accessed 2023-8-07).
- Provably-safe multilingual software sandboxing using WebAssembly. In Proceedings of the USENIX Security Symposium, August 2022.
- The state-of-the-art in container technologies: Application, orchestration and security. Concurrency and Computation: Practice and Experience, 32(17):e5668, 2020. e5668 cpe.5668.
- Measuring docker performance: What a mess!!! In Proceedings of the 8th ACM/SPEC on International Conference on Performance Engineering Companion, ICPE ’17 Companion, page 11–16, New York, NY, USA, 2017. Association for Computing Machinery.
- David Chisnall. The definitive guide to the xen hypervisor. Pearson Education, 2008.
- Jonathan Corbet. Seccomp and sandboxing. lwn (13 may 2009), 2009.
- Techniques and applications for guest-language safepoints. In Proceedings of the 10th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems, ICOOOLPS ’15, New York, NY, USA, 2015. Association for Computing Machinery.
- Mathias Danzeisen. Truly portable vehicle applications using webassembly & wasi. COVESA All Member Meeting, April 2023.
- Frank Denis. Performance of webassembly runtimes in 2023, 2023.
- Gpu virtualization on vmware’s hosted i/o architecture. ACM SIGOPS Operating Systems Review, 43(3):73–82, 2009.
- Serverless computing on heterogeneous computers. In Proceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS ’22, page 797–813, New York, NY, USA, 2022. Association for Computing Machinery.
- Catalyzer: Sub-millisecond startup for serverless computing with initialization-less booting. In Proceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS ’20, page 467–481, New York, NY, USA, 2020. Association for Computing Machinery.
- Vx32: Lightweight user-level sandboxing on the x86. In 2008 USENIX Annual Technical Conference (USENIX ATC 08), 2008.
- Sledge: A serverless-first, light-weight wasm runtime for the edge. In Proceedings of the 21st International Middleware Conference, Middleware ’20, page 265–279, New York, NY, USA, 2020. Association for Computing Machinery.
- Simulation and formal verification of x86 machine-code programs that make system calls. In 2014 Formal Methods in Computer-Aided Design (FMCAD), pages 91–98, 2014.
- VMware vSphere design. John Wiley & Sons, 2013.
- Bringing the web up to speed with WebAssembly. In Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2017, page 185–200, New York, NY, USA, 2017. Association for Computing Machinery.
- An optimization approach for qemu. In 2009 First International Conference on Information Science and Engineering, pages 129–132, 2009.
- Bluevisor: A scalable real-time hardware hypervisor for many-core embedded systems. In 2018 IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS), pages 75–84. IEEE, 2018.
- Wave: a verifiably secure webassembly sandboxing runtime. In 2023 IEEE Symposium on Security and Privacy (SP), pages 2940–2955, 2023.
- Marcin Juszkiewicz. Linux system calls tables for several architectures. https://marcin.juszkiewicz.com.pl/download/tables/syscalls.html, 2023. (Accessed 2023-08-09).
- Avengers, assemble! survey of webassembly security solutions. In 2022 IEEE 15th International Conference on Cloud Computing (CLOUD), pages 543–553, 2022.
- Integration with docker container technologies for distributed and microservices applications: A state-of-the-art review. Int. J. Syst. Serv.-Oriented Eng., 12(1):1–22, apr 2022.
- kvm: the linux virtual machine monitor. In Proceedings of the Linux symposium, volume 1, pages 225–230. Dttawa, Dntorio, Canada, 2007.
- Sel4: Formal verification of an operating-system kernel. Commun. ACM, 53(6):107–115, jun 2010.
- Kevin P Lawton. Bochs: A portable pc emulator for unix/x. Linux Journal, 1996(29es):7–es, 1996.
- Everything old is new again: Binary security of {{\{{WebAssembly}}\}}. In 29th USENIX Security Symposium (USENIX Security 20), pages 217–234, 2020.
- Xavier Leroy. Formal verification of a realistic compiler. Commun. ACM, 52(7):107–115, jul 2009.
- Thingspire os: A WebAssembly-based iot operating system for cloud-edge integration. In Proceedings of the 19th Annual International Conference on Mobile Systems, Applications, and Services, MobiSys ’21, page 487–488, New York, NY, USA, 2021. Association for Computing Machinery.
- Bringing webassembly to resource-constrained iot devices for seamless device-cloud integration. In Proceedings of the 20th Annual International Conference on Mobile Systems, Applications and Services, pages 261–272, 2022.
- Aerogel: Lightweight access control framework for webassembly-based bare-metal iot devices. In 2021 IEEE/ACM Symposium on Edge Computing (SEC), pages 94–105, 2021.
- C# and the. net framework: Ready for real time? IEEE software, 20(1):74–80, 2003.
- LXC. Lxc introduction. https://linuxcontainers.org/lxc/introduction/, 2023. (Accessed 2023-8-08).
- My vm is lighter (and safer) than your container. In Proceedings of the 26th Symposium on Operating Systems Principles, pages 218–233, 2017.
- Xtratum: a hypervisor for safety critical embedded systems. In 11th Real-Time Linux Workshop, volume 9. Citeseer, 2009.
- Twine: An embedded trusted runtime for webassembly. In 2021 IEEE 37th International Conference on Data Engineering (ICDE), pages 205–216, Los Alamitos, CA, USA, apr 2021. IEEE Computer Society.
- Dirk Merkel. Docker: lightweight linux containers for consistent development and deployment. Linux journal, 2014(239):2, 2014.
- Microsoft. Hyper-v technology overview. https://learn.microsoft.com/en-us/windows-server/virtualization/hyper-v/hyper-v-technology-overview, 2021. (Accessed 2023-8-08).
- Support for just-in-time compilation of webassembly for embedded systems. In 2023 12th Mediterranean Conference on Embedded Computing (MECO), pages 1–4, 2023.
- Edgedancer: Secure mobile WebAssembly services on the edge. In Proceedings of the 4th International Workshop on Edge Systems, Analytics and Networking, EdgeSys ’21, page 13–18, New York, NY, USA, 2021. Association for Computing Machinery.
- Predictable virtualization on memory protection unit-based microcontrollers. In 2018 IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS), pages 62–74. IEEE, 2018.
- Embedded hypervisor xvisor: A comparative analysis. In 2015 23rd Euromicro International Conference on Parallel, Distributed, and Network-Based Processing, pages 682–691. IEEE, 2015.
- Towards a trustzone-assisted hypervisor for real-time embedded systems. IEEE computer architecture letters, 16(2):158–161, 2016.
- Browsix: Bridging the gap between unix and the browser. In Proceedings of the Twenty-Second International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS ’17, page 253–266, New York, NY, USA, 2017. Association for Computing Machinery.
- Solaris zones: Operating system support for consolidating commercial workloads. In Proceedings of the 18th USENIX Conference on System Administration, LISA ’04, page 241–254, USA, 2004. USENIX Association.
- Iris-wasm: Robust and modular verification of webassembly programs. Proc. ACM Program. Lang., 7(PLDI), jun 2023.
- Alastair Reid. Trustworthy specifications of arm® v8-a and v8-m system level architecture. In 2016 Formal Methods in Computer-Aided Design (FMCAD), pages 161–168, 2016.
- Fabian Scheidl. Webassembly: Paving the way towards a unified and distributed intra-vehicle computing-and data-acquisition-platform? In 2020 AEIT International Conference of Electrical and Electronic Technologies for Automotive (AEIT AUTOMOTIVE), pages 1–6. IEEE, 2020.
- Exploring wsl2. Learn Windows Subsystem for Linux: A Practical Guide for Developers and IT Professionals, pages 75–98, 2020.
- Draco: Architectural and operating system support for system call security. In 2020 53rd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO), pages 42–57, 2020.
- An evaluation of webassembly in non-web environments. In 2021 XLVII Latin American Computing Conference (CLEI), pages 1–10, 2021.
- William Stackenäs. An evaluation of webassembly pre-initialization for faster startup times. Master’s thesis, KTH, School of Electrical Engineering and Computer Science (EECS), 2023.
- Osek/vdx api for java. In Proceedings of the 3rd workshop on Programming languages and operating systems: linguistic support for modern operating systems, pages 4–es, 2006.
- Selwasm: A code protection mechanism for webassembly. In 2019 IEEE Intl Conf on Parallel & Distributed Processing with Applications, Big Data & Cloud Computing, Sustainable Computing & Communications, Social Computing & Networking (ISPA/BDCloud/SocialCom/SustainCom), pages 1099–1106. IEEE, 2019.
- Leaps and bounds: Analyzing webassembly’s performance with a focus on bounds checking. In 2022 IEEE International Symposium on Workload Characterization (IISWC), pages 256–268, 2022.
- Scalable translation validation of unverified legacy os code. In 2019 Formal Methods in Computer Aided Design (FMCAD), pages 1–9, 2019.
- Ben L. Titzer. A fast in-place interpreter for webassembly. Proc. ACM Program. Lang., 6(OOPSLA2), oct 2022.
- Kenton Varda. WebAssembly on Cloudflare Workers. https://blog.cloudflare.com/webassembly-on-cloudflare-workers/. (Accessed 2021-07-06).
- Aneka: a software platform for .net-based cloud computing. High speed and large scale scientific computing, 18(3):267–295, 2009.
- Potential of webassembly for embedded systems. In 2022 11th Mediterranean Conference on Embedded Computing (MECO), pages 1–4. IEEE, 2022.
- Characterizing and optimizing kernel resource isolation for containers. Future Generation Computer Systems, 141:218–229, 2023.
- Weihang Wang. Empowering web applications with webassembly: Are we there yet? In 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE), pages 1301–1305, 2021.
- Wenwen Wang. How far we’ve come – a characterization study of standalone webassembly runtimes. In 2022 IEEE International Symposium on Workload Characterization (IISWC), pages 228–241, 2022.
- Conrad Watt. Mechanising and verifying the WebAssembly specification. In Proceedings of the 7th ACM SIGPLAN International Conference on Certified Programs and Proofs, CPP 2018, page 53–65, New York, NY, USA, 2018. Association for Computing Machinery.
- Performance optimization for infiniband virtualization on qemu/kvm. In 2019 IEEE International Conference on Cloud Computing Technology and Science (CloudCom), pages 19–26, 2019.
- Wasmachine: Bring iot up to speed with a webassembly os. In 2020 IEEE International Conference on Pervasive Computing and Communications Workshops (PerCom Workshops), pages 1–4, 2020.
- Unikernel monitors: Extending minimalism outside of the box. In 8th USENIX Workshop on Hot Topics in Cloud Computing (HotCloud 16), Denver, CO, June 2016. USENIX Association.
- An end-to-end toolchain for evaluating webassembly runtimes for cps-iot use cases. WebAssembly Research Day 2022, October 2022.
- Writing solaris device drivers in java. In Proceedings of the 3rd workshop on Programming languages and operating systems: linguistic support for modern operating systems, pages 3–es, 2006.
- The true cost of containing: A {{\{{gVisor}}\}} case study. In 11th USENIX Workshop on Hot Topics in Cloud Computing (HotCloud 19), 2019.
- {{\{{XRP}}\}}:{{\{{In-Kernel}}\}} storage functions with {{\{{eBPF}}\}}. In 16th USENIX Symposium on Operating Systems Design and Implementation (OSDI 22), pages 375–393, 2022.
- Hacl*: A verified modern cryptographic library. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, CCS ’17, page 1789–1806, New York, NY, USA, 2017. Association for Computing Machinery.
- Arjun Ramesh (2 papers)
- Tianshu Huang (7 papers)
- Ben L. Titzer (10 papers)
- Anthony Rowe (10 papers)