悉德:用 Rust 编写应用程序内核[视频]
Syd: Writing an application kernel in Rust [video]

原始链接: https://fosdem.org/2026/schedule/event/3AHJPR-rust-syd-application-kernel/

Syd是一个基于Rust的应用内核,旨在实现可移植性和安全性。本次演讲详细介绍了其运行时架构,该架构围绕着一系列专用线程构建:一个用于设置的主线程,一个用于生命周期管理的监控线程,一个用于系统调用处理的模拟器工作线程池,以及用于IPC、定时器和密码学的线程。 其关键安全特性包括最少的`unsafe`代码,使用`unshare`和`seccomp`实现线程隔离,系统调用参数验证,以及使用`mseal`进行内存密封。Syd优先考虑可移植性,支持多种架构(x86、ARM、PPC、RISC-V、s390x、LoongArch)和Linux内核版本(≥ 5.19),Rust MSRV为1.83+。 本次演讲提供了使用Rust构建线程隔离、多架构系统调用代理的实用见解。

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 Syd: 用 Rust 编写应用程序内核 [视频] (fosdem.org) 3 点赞 hayali 1 小时前 | 隐藏 | 过去 | 收藏 | 讨论 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Syd (sydbox-3) is an application kernel written in Rust. This talk is a tour of its runtime architecture and the Rust that makes it portable. We’ll walk through the threads and their roles: syd_main (startup, namespaces, policy load, lock), syd_mon (lifecycle, seccomp-notify plumbing), a CPU-sized pool of syd_emu workers (syscall brokering), syd_ipc (UNIX-socket control when lock:ipc is enabled), syd_int (timers/alarms), and syd_aes (AF_ALG crypto for Crypt sandboxing, plus helpers syd-pty and syd-tor. Implementation highlights: minimal unsafe at the syscall edge; per-thread isolation with unshare(CLONE_FS|CLONE_FILES) and per-thread seccomp(2); syscall-argument cookies; forced O_CLOEXEC and randomized FDs; deterministic "last-match-wins" policy; and mseal(2) sealing on lock:on. Portability is first-class: one codebase for Linux ≥ 5.19 with proper multi-arch support (x86-64/x86/x32, arm64/armv7, ppc64{b,l}e, riscv64, s390x, loongarch64), ILP32/LP64 awareness, and MSRV 1.83+. You’ll leave with concrete patterns for building a thread-isolated, multi-arch syscall broker in Rust.

联系我们 contact @ memedata.com