News: 0001506177

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Linux 6.13 Introducing New Rust File Abstractions

([Linux Kernel] 5 Hours Ago Rust File Abstractions)


Alongside the VFS pull requests on Friday for [1]case insensitive Tmpfs support and [2]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 [3]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 [4]Rust support for in-place kernel modules .



[1] https://www.phoronix.com/news/Linux-6.13-Tmpfs-Case-Folding

[2] https://www.phoronix.com/news/Linux-6.13-VFS-Untorn-Writes

[3] https://lore.kernel.org/lkml/20241115-vfs-rust-file-c79423c56dcc@brauner/

[4] https://www.phoronix.com/news/Linux-6.13-Rust-InPlaceModule



peterdk

Quackdoc

heavy, adj.:
Seduced by the chocolate side of the force.