Release of Asterinas kernel 0.18, written in Rust and compatible with Linux

The release of project Asterinas 0.18 has been announced, developing a kernel written in Rust intended for use in general-purpose operating systems. The kernel provides an ABI (Application Binary Interface) that is compatible with the Linux kernel and can be used as a replacement. The Asterinas NixOS distribution is being developed in parallel, combining the Asterinas kernel with the NixOS system environment. The project code is distributed under the MPL (Mozilla Public License).

Currently, the kernel implements around 240 Linux system calls. More than 100 packages from NixOS have been verified to work on the Asterinas NixOS distribution running on top of the Asterinas kernel. Supported packages include: Xfce, Firefox, bash, systemd, Podman, QEMU, rsync, Apache httpd, nginx, SQLite, Redis, Clang, GCC, Go, Lua, Node.js, OpenJDK, Perl, PHP, Python, Ruby, Rust, Git, FFmpeg, PyTorch, TensorFlow, Ollama, and Codex.

The kernel offers full support for the x86-64 architecture, partial support for RISC-V 64 and x86-64 with Intel TDX-based isolation, as well as initial support for the LoongArch 64 architecture. Priority areas of application include systems relying on Linux ABI but requiring a higher level of security. For example, Asterinas is proposed for creating a secure system environment, of virtual machines, which utilizes technologies such as ARM CCA, AMD SEV, and Intel TDX, as well as on the host system side that supports container execution.

To reduce the likelihood of memory-related errors, which are the main source of the most dangerous vulnerabilities, the Asterinas kernel is developed using the Rust language and a strategy of limited use of unsafe blocks. The kernel is built using the framekernel architecture, attempting to combine the isolation capabilities of microkernels with the efficiency of monolithic kernels.

Core components in Asterinas are located in a shared address space, with security achieved through logical separation of secure code from code where security issues may arise. The kernel is divided into two parts, written in Rust: OS Framework and OS Services. Unsafe blocks are prohibited in OS Services, and all low-level operations requiring unsafe block execution are moved to the OS Framework, accessible only through a high-level API. All system calls, file systems, and drivers are implemented at the OS Services level and cannot include unsafe blocks.

For developing system services and kernel modules, the OSDK (Operating System Development Kit) is provided, offering the cargo-osdk utility for creating, building, testing, and running operating system components. A set of OSTD (Operating System Standard Library) libraries is prepared for developers, including a version of the Rust standard libraries (crate std), adapted for use in operating system components.

Among the changes in version 0.18:

  • As part of the effort to enable Asterinas to run as a guest system in VM containers like Kata Containers and Confidential Containers, support for IPC namespace and cgroup, nsfs (/proc/[pid]/ns), cgroups, virtio-fs (for accessing shared filesystem with the host system), virtio-rng (/dev/hwrng for entropy to the pseudorandom number generator), and vsock (for communication between host and guest systems) has been implemented.
  • The ptrace system call and debugging capabilities in user space using GDB and strace have been implemented.
  • A new implementation of the ext2 filesystem has been proposed, along with the addition of an NVMe driver. Dentry (Directory Entry) mechanism has been added to the VFS, and the page cache implementation has been redesigned.
  • The Asterinas NixOS distribution has introduced the ability to run Codex, QEMU, and Firefox.
  • System calls pidfd_getfd, pidfd_send_signal, and pivot_root have been added.
  • Initial support for IPv6.
  • A capabilities system has been implemented for delegating specific privileged operations.
  • An initial implementation of the LSM (Linux Security Modules) framework has been added.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster