All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] drm/tyr: allow mismatched buffers for dev_query
@ 2026-10-21  0:06 Deborah Brouwer
  2026-10-21  0:06 ` [PATCH v4 1/3] rust: uaccess: add UserSliceWriter::clear() Deborah Brouwer
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Deborah Brouwer @ 2026-10-21  0:06 UTC (permalink / raw)
  To: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Danilo Krummrich, Daniel Almeida, Tamir Duberstein,
	Alexandre Courbot, Onur Özkan, David Airlie, Simona Vetter
  Cc: rust-for-linux, linux-kernel, dri-devel, Deborah Brouwer

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.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
---
This series depends on:
[PATCH v5 0/2] drm/tyr: safely write GpuInfo to userspace 
https://lore.kernel.org/rust-for-linux/20261020-b4-gpu_info_intobytes-v5-0-3e0c7c93223c@collabora.com

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/20261016-b4-dev_query_fixes-v3-0-f8071cda3515@collabora.com

Changes in v3:
- replace "as" cast with lossless u32_as_usize()
- Link to v2: https://lore.kernel.org/r/20261015-b4-dev_query_fixes-v2-0-e3e6d25050cb@collabora.com

Changes in v2:
- Added #[inline] to UserSliceWriter::clear()
- Link to v1: https://lore.kernel.org/r/20261014-b4-dev_query_fixes-v1-0-92043100b472@collabora.com

---
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,
-- 
Deborah Brouwer <deborah.brouwer@collabora.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-21  0:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-21  0:06 [PATCH v4 0/3] drm/tyr: allow mismatched buffers for dev_query Deborah Brouwer
2026-10-21  0:06 ` [PATCH v4 1/3] rust: uaccess: add UserSliceWriter::clear() Deborah Brouwer
2026-10-21  0:06 ` [PATCH v4 2/3] rust: uaccess: add method to get UserPtr from u64 Deborah Brouwer
2026-10-21  0:06 ` [PATCH v4 3/3] drm/tyr: allow userspace buffers to be mismatched Deborah Brouwer

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.