Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux is now making an effort to incorporate rust into the Kernel and userspace #2580

Open
2 tasks done
kekkoudesu opened this issue May 24, 2024 · 1 comment
Open
2 tasks done
Labels
t:correction content corrections or errors

Comments

@kekkoudesu
Copy link

Affected page

https://www.privacyguides.org/en/os/linux-overview/#missing-security-features

Description

The page currently reads:

Memory corruption bugs are responsible for the majority of vulnerabilities fixed and assigned a CVE. While this is also true for Windows and macOS, they are quickly making progress on adopting memory-safe languages—such as Rust and Swift, respectively—while there is no similar effort to rewrite Linux in a memory-safe language like Rust.

This is no longer true. The kernel's official documentation reads:

Currently, the Rust support is primarily intended for kernel developers and maintainers interested in the Rust support, so that they can start working on abstractions and drivers, as well as helping the development of infrastructure and tools.

If you are an end user, please note that there are currently no in-tree drivers/modules suitable or intended for production use, and that the Rust support is still in development/experimental, especially for certain kernel configurations.

This qualifies as an effort to adopt Rust into the kernel. There isn't an intention to rewrite the entire kernel in Rust, but I'm not sure that's the intention with Windows or macOS either. Having some memory safety that comes with good guarantees is much better than having none at all.

On the userspace side, Rust is being used already.

A notable recent development is the announcement of Nova, the upcoming NVIDIA kernel driver for newer NVIDIA GPUs written in Rust. It follows the impressively fast development of NVK, a userspace NVIDIA driver which uses the NAK compiler backend written in Rust, and released this week in Mesa 24.1, now "ready for prime-time". Nouveau, the current kernel driver for NVIDIA, also uses the NAK compiler.

Notably, Asahi Linux also built and uses a GPU driver written in Rust.

Sources

https://docs.kernel.org/rust/index.html
https://rust-for-linux.com
https://rust-for-linux.com/nova-gpu-driver
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998
https://lists.freedesktop.org/archives/mesa-dev/2024-May/226222.html
https://rust-for-linux.com/apple-agx-gpu-driver

Before submitting

  • I am reporting something that is verifiably incorrect, not a suggestion or opinion.
  • I agree to the Community Code of Conduct.
@kekkoudesu kekkoudesu added the t:correction content corrections or errors label May 24, 2024
@kekkoudesu kekkoudesu changed the title Linux is now making an effort to rewrite parts of the kernel in Rust Linux is now making an effort to incorporate rust into the Kernel and userspace May 24, 2024
@kekkoudesu
Copy link
Author

There's also Newton and AccessKit, the new accessibility stack written in Rust: https://blogs.gnome.org/a11y/2024/06/18/update-on-newton-the-wayland-native-accessibility-project/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:correction content corrections or errors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant