May 5, 2024

Ferrum College : Iron Blade Online

Complete Canadian News World

Microsoft rewrites parts of the Windows Kernel in Rust

Microsoft rewrites parts of the Windows Kernel in Rust

Microsoft Vice President David Weston revealed this week that Microsoft will follow suit with Linux and rewrite parts of the Windows kernel in Rust.

“We’re in the crawling phase of crawling, walking, and running Rust in Windows,” Mr. Weston said during an appearance at Microsoft’s BlueHat IL 2023 conference. “We’re talking about one of the most complex engineered products on the planet. But our goal is to do that to improve security… So you’ll actually see Windows start up with Rust in the kernel in the next few weeks or months, which is really cool. The primary goal here is to transform Some internal C++ data types to Rust equivalents.”

The sample code he showed showed part of the reason for this conversion: Rust code is easier to write and understand than existing C++ code. It’s also safer and more secure: For those unfamiliar, Rust is a modern C-like programming language beloved by developers because it forces secure native code generation without the burden of managed languages.

According to Weston, Microsoft has already rewritten 36,000 lines of code in the Windows kernel in Rust, in addition to writing another 152,000 lines of proof-of-concept code in the DirectWrite Core library, and the performance is excellent with no regression compared to the old C++ code. He also noted that “there is now a syscall, in the Windows kernel, written in Rust.” A system request, or system call, is how user-mode applications interact with (to oversimplify) internal kernel functions.

I’m curious as to how Microsoft calls this work in the future, but the DirectWrite Core library is now available in the Windows App SDK, and some GDI work will be available soon to Insiders. What Microsoft won’t do is completely replace “40 years of work” in C/C++ in the kernel with Rust, but I’m sure it makes more sense to replace some of that work to remove old attack surfaces while porting a new kernel to work on Rust, as with Linux: The recently released Linux 6.1 kernel is the first kernel to include Rust code.

See also  Battlefield 2042 pulls the look of Russia in light of current events