HackerPapers

arXiv:2312.03858cs.OS

Empowering WebAssembly with Thin Kernel Interfaces

Arjun Ramesh, Tianshu Huang, Ben L. Titzer, Anthony Rowe

Abstract

Wasm is gaining popularity outside the Web as a well-specified low-level binary format with ISA portability, low memory footprint and polyglot targetability, enabling efficient in-process sandboxing of untrusted code. Despite these advantages, Wasm adoption for new domains is often hindered by the lack of many standard system interfaces which precludes reusability of existing software and slows ecosystem growth. This paper proposes thin kernel interfaces for Wasm, which directly expose OS userspace syscalls without breaking intra-process sandboxing, enabling a new class of virtualization with Wasm as a universal binary format. By virtualizing the bottom layer of userspace, kernel interfaces enable effortless application ISA portability, compiler backend reusability, and armor programs with Wasm's built-in control flow integrity and arbitrary code execution protection. Furthermore, existing capability-based APIs for Wasm, such as WASI, can be implemented as a Wasm module over kernel interfaces, improving reuse, robustness, and portability through better layering. We present an implementation of this concept for two kernels -- Linux and Zephyr -- by extending a modern Wasm engine and evaluate our system's performance on a number of sophisticated applications which can run for the first time on Wasm.

arXiv comments
This work is published at EuroSys 2025, Rotterdam, Netherlands (March 30 - April 3) 14 pages, 8 figures
Journal reference
Twentieth European Conference on Computer Systems (EuroSys 2025)
DOI
doi:10.1145/3689031.3717470
Subjects
cs.OSOperating Systems cs.SESoftware Engineering

On Hacker News

Linked by 2 identifiable commenters in 2 comments across 2 threads, from Jan 2024 to Feb 2025. Found in 2 HN submissions from Dec 2023 to Dec 2023. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments2 threads

  1. WASM will replace containers 1 comment
    • > the downside is that it means you have to re-invent the world to work with this flavor of runtime. This is at least one of the reasons we've been building thin kernel interfaces for Wasm. We've built two now, one for the Linux syscall interface…

      titzerView on HNParent context

    • Rather than the "easy" way of porting an x86 emulator to WASM, I've been trying to natively port the Linux kernel to WASM. UML[0] and LKL[1] prove that running the kernel in a process is viable. μClinux efforts like NOMMU and binfmt_flat prove that you don't need…

      tomblView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.