Re: [PATCH RFC 0/4] rust: dma: bridge zerocopy-derived types into the transmute byte-safety bound
From: Danilo Krummrich
Date: Mon Jun 29 2026 - 05:02:54 EST
On Mon Jun 29, 2026 at 10:20 AM CEST, Alistair Popple wrote:
> I think the context is in the description for patch 1. It's not directly related
> to the bindings generator. Basically the problem is that these bindings are a
> little bit unique in that we access them using the dma_write/read macros. In
> other words we use these with Dma::Coherent which still requires the transmute
> rather than zerocopy trait bounds to be implemented.
>
> That said I think the correct long-term fix here would be to fix Dma::Coherent
> to make it work with the zerocopy traits. Not sure if anyone is looking at that
> or not.
I think it can just be done short term, please also see [1]. We can just convert
the DMA code right away, no need for the proposed indirection.
[1] https://lore.kernel.org/all/DJLEHDNJCUD0.38PFZ5773D6BX@xxxxxxxxxx/