Skip to content

drm/tyr: allow mismatched buffers for dev_query

Deborah Brouwer dri-devel lkml rust-for-linux 4 versions – Applied

Status from this message: Applied to drm-rust-next. Thanks!

Get series with b4
b4 am [email protected] change-id 20261014-b4-dev_query_fixes-4e0ab024294a

Versions newest first

  1. v4 Latest3 patches 7 repliesApplied
  2. v32 patches 3 repliesSuperseded
  3. v22 patches 4 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches0 repliesSuperseded

Changes in v4 from the cover letter

- add new UserPtr method to accept u64 address
- replace write_truncated() with write_slice_partial()
- replace AsBytes with IntoBytes + Immutable in set_uobj
- replace u32_as_usize with usize::from_safe_cast
- remove redundant import size_of_val
- Link to v3: https://lore.kernel.org/r/[email protected]

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/3rust: uaccess: add UserSliceWriter::clear()rust/helpers/uaccess.c rust/kernel/uaccess.rs+30 -01 reply
2/3rust: uaccess: add method to get UserPtr from u64rust/kernel/uaccess.rs+9 -02 replies
3/3drm/tyr: allow userspace buffers to be mismatcheddrivers/gpu/drm/tyr/file.rs+41 -81 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAlice RyhlGary GuoMiguel Ojeda
SeriesA-b
1/3R-b R-b
2/3R-b R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/3] drm/tyr: allow mismatched buffers for dev_query

Panthor UAPI for DRM_IOCTL_PANTHOR_DEV_QUERY allows userspace to provide a smaller or larger buffer than the kernel needs. Revise Tyr's implementation to match the expected UAPI behaviour.

---
This series depends on:
[PATCH v5 0/2] drm/tyr: safely write GpuInfo to userspace
https://lore.kernel.org/rust-for-linux/[email protected]

Changes in v4:
- add new UserPtr method to accept u64 address
- replace write_truncated() with write_slice_partial()
- replace AsBytes with IntoBytes + Immutable in set_uobj
- replace u32_as_usize with usize::from_safe_cast
- remove redundant import size_of_val
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- replace "as" cast with lossless u32_as_usize()
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Added #[inline] to UserSliceWriter::clear()
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Deborah Brouwer (3):
rust: uaccess: add UserSliceWriter::clear()
rust: uaccess: add method to get UserPtr from u64 drm/tyr: allow userspace buffers to be mismatched

 drivers/gpu/drm/tyr/file.rs | 49 +++++++++++++++++++++++++++++++++++++--------
 rust/helpers/uaccess.c      |  6 ++++++
 rust/kernel/uaccess.rs      | 33 ++++++++++++++++++++++++++++++
 3 files changed, 80 insertions(+), 8 deletions(-)

---
base-commit: 3497a403264b094ebd61b8b755165d56e7d9dc37
change-id: 20261014-b4-dev_query_fixes-4e0ab024294a
prerequisite-change-id: 20260923-b4-gpu_info_intobytes-c2d45f2935c8:v5
prerequisite-patch-id: 0ff3c9871f563680d2888d489cc155cc52788048
prerequisite-patch-id: ecf0aed0bd7e4f8d3bc1bbaabb02976fc8d5fa4d

Best regards,

Signature · 1 line
Deborah Brouwer <[email protected]>