From: sashiko-bot@kernel.org
To: "Riana Tauro" <riana.tauro@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 1/5] drm/xe/xe_drm_ras: Rename ras to drm_ras in xe_device
Date: Tue, 25 Aug 2026 06:46:22 +0000 [thread overview]
Message-ID: <20260825064623.872091F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260825063615.3697317-8-riana.tauro@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Missing bounds check on severity and component indices in xe_drm_ras_event()
--
--- Patch [1]: [PATCH 1/5] drm/xe/xe_drm_ras: Rename ras to drm_ras in xe_device ---
commit 32a6f8d58b55e63675c6423a6648130b2ff82f4c
Author: Riana Tauro <riana.tauro@intel.com>
drm/xe/xe_drm_ras: Rename ras to drm_ras in xe_device
Rename ras to drm_ras in xe_device to distinguish drm-ras functionality
from device related RAS functionality. No functional changes.
> diff --git a/drivers/gpu/drm/xe/xe_drm_ras.c b/drivers/gpu/drm/xe/xe_drm_ras.c
> index 78184b6ea7d48..9f37ae732770a 100644
> --- a/drivers/gpu/drm/xe/xe_drm_ras.c
> +++ b/drivers/gpu/drm/xe/xe_drm_ras.c
[ ... ]
> @@ -196,7 +196,7 @@ static int register_nodes(struct xe_device *xe)
> */
> void xe_drm_ras_event(struct xe_device *xe, u32 component, u32 severity, u32 value)
> {
> - struct xe_drm_ras *ras = &xe->ras;
> + struct xe_drm_ras *ras = &xe->drm_ras;
> struct xe_drm_ras_counter *info = ras->info[severity];
[Severity: High]
This is a pre-existing issue, but is it possible for severity or component
to be out of bounds here?
If firmware or hardware sends a telemetry event with an unrecognized
severity or component, fallback paths might return DRM_XE_RAS_ERR_SEV_MAX
or DRM_XE_RAS_ERR_COMP_MAX.
Since ras->info is sized up to DRM_XE_RAS_ERR_SEV_MAX, using it as an index
reads past the end of the array. Because info is the final member of
struct xe_drm_ras inside struct xe_device, ras->info[DRM_XE_RAS_ERR_SEV_MAX]
could fetch the adjacent xe->i2c pointer.
The code would then treat this as an array of struct xe_drm_ras_counter,
which could lead to an invalid pointer dereference when evaluating
info[component].name later in the function.
Should there be bounds checks for severity and component before indexing
the arrays in xe_drm_ras_event()?
> struct drm_ras_node *node;
> int ret;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260825063615.3697317-7-riana.tauro@intel.com?part=1
next prev parent reply other threads:[~2026-08-25 6:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-25 6:36 [PATCH 0/5] Add support to handle memory double-bit ecc errors Riana Tauro
2026-08-25 6:36 ` [PATCH 1/5] drm/xe/xe_drm_ras: Rename ras to drm_ras in xe_device Riana Tauro
2026-08-25 6:46 ` sashiko-bot [this message]
2026-08-28 15:13 ` Rodrigo Vivi
2026-08-25 6:36 ` [RFC PATCH 2/5] drm/xe/xe_ras: Handle page offline requests for device memory ecc errors Riana Tauro
2026-08-25 6:49 ` sashiko-bot
2026-08-25 6:36 ` [PATCH 3/5] drm/xe/xe_ras: Add support to query page offline queue and list Riana Tauro
2026-08-25 6:50 ` sashiko-bot
2026-08-25 6:36 ` [PATCH 4/5] drm/xe/xe_ras: Add function to get maximum pages firmware can store Riana Tauro
2026-08-25 6:36 ` [PATCH 5/5] drm/xe/xe_ras: Track offlined pages by firmware to avoid duplicates Riana Tauro
2026-08-25 6:52 ` sashiko-bot
2026-08-25 9:19 ` ✓ CI.KUnit: success for Add support to handle memory double-bit ecc errors Patchwork
2026-08-25 9:57 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-08-25 14:29 ` ✗ Xe.CI.FULL: " Patchwork
2026-08-28 15:15 ` [PATCH 0/5] " Rodrigo Vivi
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=20260825064623.872091F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=riana.tauro@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox