From: sashiko-bot@kernel.org
To: "Danilo Krummrich" <dakr@kernel.org>
Cc: dri-devel@lists.freedesktop.org, ojeda@kernel.org, gary@garyguo.net
Subject: Re: [PATCH 3/4] drm/tyr: use pin-init self-referential support
Date: Wed, 18 Nov 2026 23:47:04 +0000 [thread overview]
Message-ID: <sashiko-outbox-222213@kernel.org> (raw)
In-Reply-To: <20261118233727.3147222-4-dakr@kernel.org>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [High] drm/tyr: unaligned BO size in new_dummy_object() and
KernelBo::new() [1]
--
commit c6eb3c50c479a4d12cbfccb1e7746b3f539a34fd
Author: Danilo Krummrich <dakr@kernel.org>
drm/tyr: use pin-init self-referential support
This commit replaces Arc-based sharing of the MMIO mapping, MMU, and
firmware VM in the Tyr driver with borrows using pin-init's
self-referential struct support.
> diff --git a/drivers/gpu/drm/tyr/gem.rs b/drivers/gpu/drm/tyr/gem.rs
> index 0439bf96467f3..05965a9135b77 100644
> --- a/drivers/gpu/drm/tyr/gem.rs
> +++ b/drivers/gpu/drm/tyr/gem.rs
[ ... ]
> @@ -99,7 +96,7 @@ impl<'bo> KernelBo<'bo> {
> /// cleaned up when the [`KernelBo`] is dropped.
> pub(crate) fn new(
> ddev: &TyrDrmDevice,
> - vm: Arc<Vm<'bo>>,
> + vm: &'bo Vm<'bo, 'res>,
> size: u64,
> va_alloc: KernelBoVaAlloc,
> flags: VmMapFlags,
[Severity: High]
This problem wasn't introduced by this patch, but can KernelBo::new() and
new_dummy_object() panic in drm_gem_private_object_init() on 16 KiB or
64 KiB page kernels [1]?
new_dummy_object() passes a hardcoded size of 4096 bytes to Bo::new(), and
KernelBo::new() passes firmware section sizes that are only aligned to
4 KiB:
drivers/gpu/drm/tyr/gem.rs:new_dummy_object() {
let bo = Bo::new(
ddev,
4096,
...
}
drivers/gpu/drm/tyr/gem.rs:KernelBo::new() {
...
let bo_size = usize::try_from(size).map_err(|_| EOVERFLOW)?;
let va_end = va.checked_add(size).ok_or(EINVAL)?;
let bo = Bo::new(
ddev,
bo_size,
...
}
Bo::new() forwards the size to drm_gem_private_object_init(), which
triggers BUG_ON((size & (PAGE_SIZE - 1)) != 0) during probe when
PAGE_SIZE exceeds 4 KiB.
[1] https://sashiko.dev/#/bug/linux-c7c6866e-fcae-455a-98bc-11dd06209188
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261118233727.3147222-1-dakr@kernel.org?part=3
next prev parent reply other threads:[~2026-11-18 23:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 23:37 [PATCH 0/4] drm/tyr: use pin-init self-referential support Danilo Krummrich
2026-11-18 23:37 ` [PATCH 1/4] drm/tyr: name resource lifetimes after their types Danilo Krummrich
2026-11-19 2:08 ` Gary Guo
2026-11-19 10:34 ` Danilo Krummrich
2026-11-19 11:28 ` Gary Guo
2026-11-19 12:28 ` Danilo Krummrich
2026-11-19 12:56 ` Gary Guo
2026-11-19 13:57 ` Danilo Krummrich
2026-11-19 15:44 ` Alice Ryhl
2026-11-19 16:38 ` Danilo Krummrich
2026-11-18 23:37 ` [PATCH 2/4] rust: pin-init: internal: suppress multiple_bound_locations Danilo Krummrich
2026-11-19 2:23 ` Gary Guo
2026-11-18 23:37 ` [PATCH 3/4] drm/tyr: use pin-init self-referential support Danilo Krummrich
2026-11-18 23:47 ` sashiko-bot [this message]
2026-11-18 23:37 ` [PATCH 4/4] drm/tyr: use ScopeGuard for firmware loading cleanup Danilo Krummrich
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=sashiko-outbox-222213@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--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.