在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):fishinabarrel/linux-kernel-module-rust开源软件地址(OpenSource Url):https://github.com/fishinabarrel/linux-kernel-module-rust开源编程语言(OpenSource Language):Rust 94.6%开源软件介绍(OpenSource Introduction):Linux kernel modules in safe RustFor most purposes, if you're interested in writing Linux kernel modules in Rust, you should look at https://github.com/Rust-for-Linux/linux, which is an effort to contribute that process to the upstream kernel. This is a framework for writing loadable Linux kernel modules in Rust, using safe abstractions around kernel interfaces and primitives. For more information on the motivation and goals for this project, check out our presentation at Linux Security Summit North America 2019 and the video on YouTube. We're immediately focusing on making this project viable for out-of-tree modules, but we also see this project as a testing ground for whether in-tree components could be written in Rust. There is a simple demo module in the hello-world directory, as well as various other examples in the tests/ directory. DesignWe run bindgen on the
kernel headers to generate automatic Rust FFI bindings. bindgen is
powered by Clang, so we use the kernel's
own build system to determine the appropriate CFLAGS. Then we write safe
bindings to these types (see the various files inside Each kernel module in Rust lives in a The kernel is inherently multi-threaded: kernel resources can be
accessed from multiple userspace processes at once, which causes
multiple threads of execution inside the kernel to handle system calls
(or interrupts). Therefore, the System requirementsWe're currently only running CI on Linux 4.15 (Ubuntu Xenial) on amd64, although we intend to support kernels from 4.4 through the latest release. Please report a bug (or better yet, send in a patch!) if your kernel doesn't work. Other architectures aren't implemented yet, but should work as long as
there's Rust and LLVM support - see #112
for expected status. They'll need You'll need to have Rust - in particular
Rust nightly, as we use some unstable
features -
and Clang installed. You need LLVM/Clang 9
(released September 2019) or higher for multiple reasons, primarily
support for If the binary named Very recent kernels may require newer versions of Clang - try Clang 11 if older versions don't work for you. Building hello-world
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论