From: "Danilo Krummrich" <dakr@kernel.org>
To: "Gary Guo" <gary@garyguo.net>
Cc: "Deborah Brouwer" <deborah.brouwer@collabora.com>,
"Alice Ryhl" <aliceryhl@google.com>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Tamir Duberstein" <tamird@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Onur Özkan" <work@onurozkan.dev>,
dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] rust: uapi: add zerocopy/zerocopy_derive
Date: Sat, 26 Sep 2026 23:38:31 +0200 [thread overview]
Message-ID: <DLPKN532X7JJ.14Z51ZIBUIK94@kernel.org> (raw)
In-Reply-To: <DLPJT1IUSKQO.1CAWHDECQAFPO@garyguo.net>
On Sat Sep 26, 2026 at 10:59 PM CEST, Gary Guo wrote:
> 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`.
We have some existing uAPI structs without explicit padding; new ones should use
explicit padding though.
But isn’t most_traits intended to handle this through best-effort derivation,
leaving IntoBytes unavailable for types with implicit padding?
next prev parent reply other threads:[~2026-09-26 21:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-26 0:26 [PATCH v3 0/2] drm/tyr: safely write GpuInfo to userspace Deborah Brouwer
2026-09-26 0:26 ` [PATCH v3 1/2] rust: uapi: add zerocopy/zerocopy_derive Deborah Brouwer
2026-09-26 15:50 ` Gary Guo
2026-09-26 16:26 ` Danilo Krummrich
2026-09-26 20:59 ` Gary Guo
2026-09-26 21:38 ` Danilo Krummrich [this message]
2026-09-26 23:49 ` Gary Guo
2026-09-27 0:08 ` Miguel Ojeda
2026-10-05 22:49 ` Deborah Brouwer
2026-10-05 22:47 ` Deborah Brouwer
2026-09-26 0:26 ` [PATCH v3 2/2] drm/tyr: safely write GpuInfo to userspace Deborah Brouwer
2026-09-26 2:44 ` Daniel Almeida
2026-09-26 16:48 ` Danilo Krummrich
2026-10-05 22:50 ` Deborah Brouwer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DLPKN532X7JJ.14Z51ZIBUIK94@kernel.org \
--to=dakr@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=deborah.brouwer@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.