Speaker
Description
Address stability is required for a lot of kernel structures. For example linked lists require the elements to have a stable address for as long as the elements are part of the list. Not complying with this requirement can result in memory safety issues.
Rust aims to prevent all such issues, therefore it prevents programmers from moving certain memory. When combining stable address requirements with initialization, Rust currently does not natively provide a way to initialize values with stable addresses using no unsafe
code. Since one of the goal of Rust-for-Linux is to prevent memory issues in the kernel, the amount of unsafe
code should be minimized.
As types with stable addresses are plenty in the kernel, I have create an API that allows users to solely use safe code to initialize values in-place and have teh guarantee that the address will not change later.
This talk covers the underlying issue, the current solution used in the kernel and problems that still have to be solved in the future.
If you are interested in the specifics of the API, please see the Rust-for-Linux website.