img
Home Blog Docs
Posts

Announcing Asterinas 0.16.0

Aug . 4 / 2025 | Authors:Hongliang Tian

Aug . 4 / 2025

Announcing Asterinas 0.16.0

By Hongliang Tian

The Asterinas community is happy to announce a new version of Asterinas, 0.16.0!

This version marks a significant leap forward with initial support for the LoongArch CPU architecture. We’ve also greatly expanded our Linux ABI compatibility by adding nine new system calls, including memfd_create and pidfd_open.

Key enhancements in this release include broadened functionality for UNIX sockets (now supporting file descriptor passing and the SOCK_SEQPACKET socket type), partial support for netlink sockets of the NETLINK_KOBJECT_UEVENT type, and the foundational implementation of CgroupFS. Our testing infrastructure has also seen a significant upgrade with the integration of system call tests from the Linux Test Project (LTP). Plus, we’ve adopted Nix for building the initramfs, which streamlines our cross-compilation and testing workflows.

We’d also like to extend a huge congratulations to members of the Asterinas community whose outstanding research papers about Asterinas were recently accepted by prestigious academic conferences:

  • “Asterinas: A Linux ABI-Compatible, Rust-Based Framekernel OS with a Small and Sound TCB” published at USENIX ATC’25
  • “Converos: Practical Model Checking for Verifying Rust OS Kernel Concurrency” published at USENIX ATC’25
  • “CortenMM: Efficient Memory Management with Strong Correctness Guarantees” to be published at SOSP’25

Demo: Booting on a Lenovo Laptop

While our early development has primarily focused on improving Asterinas for cloud environments and VMs, the enhancements in version 0.16.0 have allowed us to achieve a significant new feat: successfully booting Asterinas on a Lenovo laptop and even running a snake game!

A special shout-out to Ruihan Li for his excellent work in making this happen and capturing the demo video!

Asterinas Kernel

We have made the following key changes to the Asterinas kernel:

  • New system calls or features:
    • Memory:
      • Add the mremap system call
      • Add the memfd_create system call
      • Add the msync system call (based on an inefficient implementation)
    • Processes and IPC:
      • Add the pidfd_open system call along with the CLONE_PIDFD flag
    • File systems and I/O in general:
      • Add the close_range system call
      • Add the fadvise64 system call (dummy implementation)
      • Add the ioprio_get and ioprio_set system calls (dummy implementation)
      • Add the epoll_pwait2 system call
  • Enhanced system calls or features:
    • Processes:
      • Add FUTEX_WAKE_OP support for the futex system call
      • Add WSTOPPED and WCONTINUED support to the wait4 and waitpid system calls
      • Add more fields in /proc/*/stat and /proc/*/status
    • File systems and I/O in general:
      • Add a few more features for the statx system call
      • Fix partial writes and reads in writev and readv
      • Introduce FsType and FsRegistry
    • Sockets and network:
      • Enable UNIX sockets to send and receive file descriptors
      • Support SO_PASSCRED & SCM_CREDENTIALS & SOCK_SEQPACKET for UNIX sockets
      • Add NETLINK_KOBJECT_UEVENT support for netlink sockets (a partial implementation)
      • Support some missing socket options for UNIX stream sockets
      • Truncate netlink messages when the user-space buffer is full
      • Fix the networking address reusing behavior (SO_REUSEADDR)
    • Security:
      • Add basic cgroupfs implementation
  • New device support:
    • Add basic i8042 keyboard support
  • Enhanced device support:
    • TTY
      • Refactor the TTY abstraction to support multiple I/O devices correctly
      • Enhance the framebuffer console to support ANSI escape sequences
  • Test infrastructure:
    • Introduce the system call tests from LTP
    • Use Nix to build initramfs

OSTD & OSDK

We have made the following key changes to OSTD:

  • CPU architectures:
    • x86-64:
      • Refactor floating-point context management in context switching and signal handling
      • Use iret instead of sysret if the context is not clean
      • Don’t treat APIC IDs as CPU IDs
      • Fix some CPUID problems and add support for AMD CPUs
    • RISC-V:
      • Add RISC-V timer support
      • Parse device tree for RISC-V ISA extensions
    • LoongArch:
      • Add the initial LoongArch support
  • CPU:
    • Add support for dynamically‌-allocated CPU-local objects
    • Require T: Send for CpuLocal<T, S>
  • Memory management:
    • Adopt a two-phase locking scheme for page tables
  • Trap handling:
    • Create IrqChip abstraction
  • Task and scheduling:
    • Rewrite the Rust doc of OSTD’s scheduling module
    • Fix the race between enabling IRQs and halting CPU
  • Test infrastructure:
    • Add CI to check documentation and publish API documentation to a self-host website

We have made the following key changes to OSDK:

  • Add OSDK’s code coverage feature
  • Support cargo osdk test for RISC-V

Contributors

This release was made possible by contributions from 21 individuals. Thank you for your amazing work!

  • Ruihan Li (81 commits)
  • Qingsong Chen (31 commits)
  • jiangjianfeng (29 commits)
  • 王英泰 (28 commits)
  • Chen Chengjun (24 commits)
  • Zhang Junyang (24 commits)
  • Wang Siyuan (16 commits)
  • Marsman1996 (13 commits)
  • Cautreoxit (8 commits)
  • Hsy-Intel (6 commits)
  • Zejun Zhao (5 commits)
  • Yang Zhichao (4 commits)
  • Hongliang Tian (3 commits)
  • js2xxx (3 commits)
  • Wei Zhang (2 commits)
  • Yuke Peng (2 commits)
  • Philipp Schuster (1 commit)
  • Ruize Tang (1 commit)
  • YanWQ-monad (1 commit)
  • stuuupidcat (1 commit)
  • yuankunzhang (1 commit)

We’re incredibly proud of the progress made in Asterinas 0.16.0 and are excited about the new possibilities these changes unlock. We encourage you to explore the new features and contribute to the ongoing development!