Get the latest tech news

Resistance to Rust abstractions for DMA mapping


[LWN subscriber-only content] While the path toward the ability to write device drivers in Rust has been anything but smooth, steady progress has been made and that goal is close to being achieved — for some types of drivers at least. Device drivers need to be able to set up memory areas for direct memory access (DMA) transfers, though; that means Rust drivers will need a set of abstractions to interface with the kernel's DMA-mapping subsystem.

These include maintaining cache coherency, ensuring that pages are resident in RAM, handling device-specific addressing limitations, programming I/O memory-management units, and more. The conversation then went quiet for several days, after which Krummrich said: " Since there hasn't been a reply so far, I assume that we're good with maintaining the DMA Rust abstractions separately". A change of this magnitude to a body of code as large as the kernel was never going to be a quick or easy affair; it has gone as well as could have been expected so far, but there will be more, perhaps harder, obstacles to overcome in the future.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of DMA

DMA

Photo of Rust

Rust

Photo of resistance

resistance

Related news:

News photo

Apple responds after being forced to approve porn app on EU iPhones due to DMA [U] - 9to5Mac

News photo

Making System Calls in Rust: Requesting Services from the Kernel

News photo

A Rust procedural language handler for PostgreSQL