MacMusic  |  PcMusic  |  440 Software  |  440 Forums  |  440TV  |  Zicos
rust
Search

Rust in the Linux kernel (Google security blog)

Thursday April 15, 2021. 03:48 PM , from LWN.net
The Google security blog has a
detailed article on what a device driver written in Rust looks like.
'That is, we use Rust's ownership discipline when interacting with C
code by handing the C portion ownership of a Rust object, allowing it to
call functions implemented in Rust, then eventually giving ownership
back. So as long as the C code is correct, the lifetime of Rust file
objects work seamlessly as well, with the compiler enforcing correct
lifetime management on the Rust side, for example: open cannot return
stack-allocated pointers or heap-allocated objects containing pointers to
the stack, ioctl/read/write cannot free (or
modify without synchronization)
the contents of the object stored in filp->private_data, etc.'
https://lwn.net/Articles/852704/rss
News copyright owned by their original publishers | Copyright © 2004 - 2024 Zicos / 440Network
Current Date
Apr, Fri 26 - 01:09 CEST