Linux 6.13 Introducing New Rust File Abstractions
Alongside the VFS pull requests on Friday for case insensitive Tmpfs support and atomic writes for EXT4 and XFS, Christian Brauner also submitted a pull request for introducing some new file abstractions for the Rust programming language within the Linux kernel.
These Rust file abstractions are needed for the Rust language implementation of Google's Binder driver. These file abstractions will also be useful elsewhere in the Rust kernel code but the initial motivation was to help with the Binder driver porting.
Among these Rust additions are introducing a "NotThreadSafe" type, adding Task::current_raw, a secctx abstraction, a Kuid wrapper, a poll_table abstraction, seqfile abstraction, and Rust abstractions for "struct file" and struct cred" along with a "FileDescriptorReservation".
Brauner commented in this pull request for the imminent Linux 6.13 merge window:
We'll see what other Rust code also ends up getting submitted for the Linux 6.13 kernel cycle -- another one already on the radar is Rust support for in-place kernel modules.
These Rust file abstractions are needed for the Rust language implementation of Google's Binder driver. These file abstractions will also be useful elsewhere in the Rust kernel code but the initial motivation was to help with the Binder driver porting.
Among these Rust additions are introducing a "NotThreadSafe" type, adding Task::current_raw, a secctx abstraction, a Kuid wrapper, a poll_table abstraction, seqfile abstraction, and Rust abstractions for "struct file" and struct cred" along with a "FileDescriptorReservation".
Brauner commented in this pull request for the imminent Linux 6.13 merge window:
"This contains the file abstractions needed by the Rust implementation of the Binder driver and other parts of the kernel.
Let's treat this as a first attempt at getting something working but I do expect the actual interfaces to change significantly over time. Simply because we are still figuring out what actually works. But there's no point in further theorizing. Let's see how it holds up with actual users."
We'll see what other Rust code also ends up getting submitted for the Linux 6.13 kernel cycle -- another one already on the radar is Rust support for in-place kernel modules.
12 Comments