David Weston, vice president at Microsoft responsible for the security of the Windows operating system, shared insights on the development of Windows protection mechanisms in his report at the BlueHat IL 2023 conference. Among other things, he mentioned progress in utilizing the Rust language to enhance the security of the Windows kernel. Furthermore, it was stated that Rust-written code would be added to the Windows 11 kernel possibly within the next few months or even weeks.
Key motivations for using Rust include employing tools for safe memory handling and efforts to reduce errors in code. The initial goal is to replace some internal C++ data types with equivalent types provided in Rust. Currently, around 36,000 lines of Rust code have been prepared for inclusion in the kernel. Testing the system with the new code showed no negative impact on performance in the PCMark 10 suite (office application tests), and in some microbenchmarks, the new code even proved to be faster.

The first area for Rust implementation was the DWriteCore code, which handles font parsing. Two developers were involved in the project, spending half a year on the rewrite. The new Rust implementation increased glyph rendering performance for text by 5-15%. The second area where Rust was applied is the implementation of the REGION data type in Win32k GDI (Graphics Driver Interface). The rewritten Rust components of the GDI interface have already passed all tests for use in Windows, and the new code is anticipated to be included by default in the upcoming Windows 11 Insider test builds. Other achievements related to Rust include the translation of certain Windows system calls into this language.


KĂ€lla: opennet.ru
