From: sashiko-bot@kernel.org
To: "Deborah Brouwer" <deborah.brouwer@collabora.com>
Cc: dri-devel@lists.freedesktop.org, ojeda@kernel.org
Subject: Re: [PATCH v10 1/7] drm/tyr: add resources to RegistrationData
Date: Tue, 28 Jul 2026 18:55:57 +0000 [thread overview]
Message-ID: <20260728185558.3AC8C1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260728-fw-boot-b4-v10-1-9187aefa3f2f@collabora.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [Critical] The DEV_QUERY ioctl handler fails with -EFAULT when userspace provides a smaller buffer size than the kernel's structure size, violating the documented Panthor UAPI.
--
--- Patch [1]: [PATCH v10 1/7] drm/tyr: add resources to RegistrationData ---
commit 582ca5eb256eb752ad582c7535dd1fc5bf72cd26
Author: Deborah Brouwer <deborah.brouwer@collabora.com>
drm/tyr: add resources to RegistrationData
Currently Tyr is not storing any resources in its drm::Driver
RegistrationData. Move Tyr's device-private resources and gpu information
from drm::Driver::Data to drm::Driver::RegistrationData so they can be
accessed safely while the device is registered with userspace.
> diff --git a/drivers/gpu/drm/tyr/file.rs b/drivers/gpu/drm/tyr/file.rs
> index b686041d5d6b4..9f60a90d49487 100644
> --- a/drivers/gpu/drm/tyr/file.rs
> +++ b/drivers/gpu/drm/tyr/file.rs
[ ... ]
> @@ -53,7 +54,7 @@ pub(crate) fn dev_query(
> )
> .writer();
>
> - writer.write(&ddev.gpu_info)?;
> + writer.write(®_data.gpu_info)?;
[Severity: Critical]
This isn't a bug introduced by this patch, but does this strict size check
violate the documented Panthor UAPI?
When userspace invokes the DRM_IOCTL_PANTHOR_DEV_QUERY ioctl with a buffer
size smaller than the kernel's GpuInfo struct (for example, from older
userspace clients), the UserSliceWriter::write() method strictly enforces
that the length must be at least the size of the structure and returns
-EFAULT if it is not.
The C driver permits this as long as the size is at least the documented
min_size, copying only the truncated structure. Could this strict size
check in the Rust driver break backwards compatibility for older userspace?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260728-fw-boot-b4-v10-0-9187aefa3f2f@collabora.com?part=1
next prev parent reply other threads:[~2026-07-28 18:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 18:39 [PATCH v10 0/7] drm/tyr: firmware loading and MCU boot support Deborah Brouwer
2026-07-28 18:39 ` [PATCH v10 1/7] drm/tyr: add resources to RegistrationData Deborah Brouwer
2026-07-28 18:55 ` sashiko-bot [this message]
2026-07-28 18:39 ` [PATCH v10 2/7] drm/tyr: add a generic slot manager Deborah Brouwer
2026-07-28 18:39 ` [PATCH v10 3/7] drm/tyr: add Memory Management Unit (MMU) support Deborah Brouwer
2026-07-28 18:52 ` sashiko-bot
2026-07-28 19:31 ` Danilo Krummrich
2026-07-28 20:35 ` Deborah Brouwer
2026-07-28 21:19 ` Danilo Krummrich
2026-07-28 18:39 ` [PATCH v10 4/7] drm/tyr: add GPU virtual memory (VM) support Deborah Brouwer
2026-07-28 18:54 ` sashiko-bot
2026-07-28 18:39 ` [PATCH v10 5/7] drm/tyr: add a kernel buffer object Deborah Brouwer
2026-07-28 18:54 ` sashiko-bot
2026-07-28 18:39 ` [PATCH v10 6/7] drm/tyr: add parser for firmware binary Deborah Brouwer
2026-07-28 18:47 ` sashiko-bot
2026-07-28 18:39 ` [PATCH v10 7/7] drm/tyr: add Microcontroller Unit (MCU) booting 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=20260728185558.3AC8C1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=deborah.brouwer@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ojeda@kernel.org \
--cc=sashiko-reviews@lists.linux.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.