使用 Rex 实现安全且可用的内核扩展
Safe and usable kernel extensions with Rex
AI总结:
针对 eBPF 因语言与验证器鸿沟导致安全扩展被拒的可用性问题,提出基于安全 Rust 的内核扩展框架 Rex,通过语言级安全与轻量级运行时保障安全,无需静态验证且不牺牲性能。
摘要:
安全的内核扩展已获得广泛关注,从简单的包过滤器演变为定制存储、网络和调度的大型复杂程序。现有的内核扩展机制(如 eBPF)依赖内核内验证器,通过符号执行的静态验证来确保内核扩展的安全性。我们发现存在显著的可用性问题——安全的扩展被验证器拒绝——这是由于语言与验证器之间的鸿沟,即开发者基于编程语言契约所期望的程序安全性与验证器的期望之间存在不匹配。我们提出了 Rex,一种新的内核扩展框架,它弥合了语言与验证器之间的鸿沟,并在编程体验和可维护性方面提升了内核扩展的可用性。Rex 基于语言级安全性,提供内核扩展所需的安全属性,并配备轻量级的语言外运行时,以处理不适合静态分析的属性,包括安全异常处理、栈安全和终止性。使用 Rex,内核扩展使用安全 Rust 编写,并通过 Rex 的内核 crate 提供的安全接口与内核交互。无需单独的静态验证。Rex 解决了 eBPF 内核扩展的可用性问题,且不牺牲性能。
英文摘要:
Safe kernel extensions have gained significant traction, evolving from simple packet filters to large, complex programs that customize storage, networking, and scheduling. Existing kernel extension mechanisms like eBPF rely on in-kernel verifiers to ensure safety of kernel extensions by static verification using symbolic execution. We identify significant usability issues -- safe extensions being rejected by the verifier -- due to the language-verifier gap, a mismatch between developers' expectation of program safety provided by a contract with the programming language, and the verifier's expectation. We present Rex, a new kernel extension framework that closes the language-verifier gap and improves the usability of kernel extensions in terms of programming experience and maintainability. Rex builds upon language-based safety to provide safety properties desired by kernel extensions, along with a lightweight extralingual runtime for properties that are unsuitable for static analysis, including safe exception handling, stack safety, and termination. With Rex, kernel extensions are written in safe Rust and interact with the kernel via a safe interface provided by Rex's kernel crate. No separate static verification is needed. Rex addresses usability issues of eBPF kernel extensions without compromising performance.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。