[PATCH v5] rust: drm: Drop the use of Opaque for ioctl arguments
Danilo Krummrich
dakr at kernel.org
Mon Jul 21 15:06:05 UTC 2025
On 7/21/25 4:55 PM, Alice Ryhl wrote:
> On Thu, Jun 26, 2025 at 06:23:13PM +0200, Beata Michalska wrote:
>> With the Opaque<T>, the expectations are that Rust should not
>> make any assumptions on the layout or invariants of the wrapped
>> C types. That runs rather counter to ioctl arguments, which must
>> adhere to certain data-layout constraints. By using Opaque<T>,
>> ioctl handlers are forced to use unsafe code where none is actually
>> needed. This adds needless complexity and maintenance overhead,
>> brining no safety benefits.
>> Drop the use of Opaque for ioctl arguments as that is not the best
>> fit here.
>>
>> Signed-off-by: Beata Michalska <beata.michalska at arm.com>
>> Acked-by: Danilo Krummrich <dakr at kernel.org>
>> Reviewed-by: Boqun Feng <boqun.feng at gmail.com>
>
> I'm guessing this should go through the DRM tree?
>
> Reviewed-by: Alice Ryhl <aliceryhl at google.com>
Yeah, I can pick it up, but it won't be considered for the upcoming merge window
anymore, but for the next. After -rc6 drm-misc is in feature freeze and I also
already send the PR for Nova.
Daniel, Beata: Is there a reason you need this earlier?
More information about the dri-devel
mailing list