[PATCH v5 0/2] drm/tyr: safely write GpuInfo to userspace
From: Deborah Brouwer
Date: Tue Oct 20 2026 - 19:48:32 EST
This series makes zerocopy and zerocopy_derive available to both the UAPI
and bindings crates.
It derives the zerocopy traits specifically for struct
drm_panthor_gpu_info, allowing Tyr to safely copy this struct byte-for-
byte into userspace memory.
Signed-off-by: Deborah Brouwer <deborah.brouwer@xxxxxxxxxxxxx>
---
Changes in v5:
- broaden subject line of first patch
- make zerocopy and zerocopy_derive available to rust-analyzer
- use 4 spaces instead of tab in make file
- re-order imports so external crates are grouped together
- remove unnecessary invariant comment
- pick up Reviewed-by tag
- Link to v4: https://lore.kernel.org/r/20261019-b4-gpu_info_intobytes-v4-0-0bc04df46549@xxxxxxxxxxxxx
Changes in v4:
- add zerocopy and zerocopy_derive to bindings crate
- move derivation for drm_panthor_gpu_info to tyr patch
- use kernel prelude to import IntoBytes
- pick up Reviewed-by tag
- Link to v3: https://lore.kernel.org/r/20260925-b4-gpu_info_intobytes-v3-0-e19bcb71980d@xxxxxxxxxxxxx
Changes in v3:
- split the commit into two to keep Tyr changes separate
- Link to v2: https://lore.kernel.org/r/20260924-b4-gpu_info_intobytes-v2-1-1b05e33df8a4@xxxxxxxxxxxxx
Changes in v2:
- use zerocopy_derive::most_traits
- Link to v1: https://lore.kernel.org/r/20260923-b4-gpu_info_intobytes-v1-1-bb2173f91e11@xxxxxxxxxxxxx
---
Deborah Brouwer (2):
rust: add zerocopy to bindings and uapi
drm/tyr: safely write GpuInfo to userspace
drivers/gpu/drm/tyr/file.rs | 2 +-
drivers/gpu/drm/tyr/gpu.rs | 19 ++-----------------
rust/Makefile | 24 ++++++++++++++++++------
rust/bindgen_parameters | 3 +++
scripts/generate_rust_analyzer.py | 4 ++--
5 files changed, 26 insertions(+), 26 deletions(-)
---
base-commit: 3497a403264b094ebd61b8b755165d56e7d9dc37
change-id: 20260923-b4-gpu_info_intobytes-c2d45f2935c8
Best regards,
--
Deborah Brouwer <deborah.brouwer@xxxxxxxxxxxxx>