Re: [PATCH v3 1/2] rust: uapi: add zerocopy/zerocopy_derive

From: Gary Guo

Date: Sat Sep 26 2026 - 16:59:30 EST


On Sat Sep 26, 2026 at 5:26 PM BST, Danilo Krummrich wrote:
> On Sat Sep 26, 2026 at 5:50 PM CEST, Gary Guo wrote:
>> On Sat Sep 26, 2026 at 1:26 AM BST, Deborah Brouwer wrote:
>>> @@ -71,3 +71,6 @@
>>> # Structs should implement `Zeroable` when all of their fields do.
>>> --with-derive-custom-struct .*=MaybeZeroable
>>> --with-derive-custom-union .*=MaybeZeroable
>>> +
>>> +# `drm_panthor_gpu_info` is copied byte-for-byte to userspace.
>>> +--with-derive-custom-struct '^drm_panthor_gpu_info$'=zerocopy_derive::most_traits
>>
>> This is Tyr specific change and should be in patch 2.
>
> Why list all of them separately? Can't we apply this to all uAPI structs?

There are types with paddings which cannot derive `IntoBytes`.

Best,
Gary