All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sk Anirban" <sk.anirban@intel.com>, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe/survivability: Fix infinite loop in aux info traversal
Date: Wed, 18 Nov 2026 19:16:56 +0000	[thread overview]
Message-ID: <sashiko-outbox-221836@kernel.org> (raw)
In-Reply-To: <20261118185015.3164387-2-sk.anirban@intel.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] drm/xe: incomplete aux info cycle check in
  populate_survivability_info()
- [Low] drm/xe: missing Fixes trailer for populate_survivability_info()
  loop fix
--

commit 19aa3366e7f1461b958c38d850bd5cc574ab58b4
Author: Sk Anirban <sk.anirban@intel.com>

> drm/xe/survivability: Fix infinite loop in aux info traversal
>
> Stop traversing the aux info linked list when an entry references
> itself, preventing an endless loop and soft lockup during probe.
>
> Signed-off-by: Sk Anirban <sk.anirban@intel.com>

[Severity: Low]
Should this include a Fixes: tag for f4e9fc967afd ("drm/xe/xe_survivability:
Redesign survivability mode") or 5e940312a2ac ("drm/xe: Add functions and
sysfs for boot survivability")?

> diff --git a/drivers/gpu/drm/xe/xe_survivability_mode.c b/drivers/gpu/drm/xe/xe_survivability_mode.c
> index d73cdad0b3a9c..1e868c52eb730 100644
> --- a/drivers/gpu/drm/xe/xe_survivability_mode.c
> +++ b/drivers/gpu/drm/xe/xe_survivability_mode.c
> @@ -170,8 +170,14 @@ static void populate_survivability_info(struct xe_device *xe)
>  	if (reg_value & AUXINFO_SUPPORT) {
>  		for (id = REG_FIELD_GET(AUXINFO_REG_OFFSET, reg_value);
>  		     id >= AUX_INFO0 && id < MAX_SCRATCH_REG;
> -		     id =  REG_FIELD_GET(AUXINFO_HISTORY_OFFSET, info[id]))
> +		     id =  REG_FIELD_GET(AUXINFO_HISTORY_OFFSET, info[id])) {
>  			set_survivability_info(mmio, info, id);
> +			if (REG_FIELD_GET(AUXINFO_HISTORY_OFFSET, info[id]) == id) {
> +				xe_warn(xe, "survivability: %s points to itself, stopping aux info walk\n",
> +					reg_map[id]);
> +				break;
> +			}
> +		}
>  	}
>  }

[Severity: Medium]
Can populate_survivability_info() still spin forever if the AUX_INFO0..4
registers form a cycle of two or more nodes (for example, AUX_INFO0 pointing
to AUX_INFO1 and AUX_INFO1 pointing back to AUX_INFO0)?  Tracking visited
registers in a bitmask or bounding the walk to MAX_SCRATCH_REG - AUX_INFO0
steps would stop multi-node cycles as well.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261118185015.3164387-2-sk.anirban@intel.com?part=1

  reply	other threads:[~2026-11-18 19:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 18:50 [PATCH] drm/xe/survivability: Fix infinite loop in aux info traversal Sk Anirban
2026-11-18 19:16 ` sashiko-bot [this message]
2026-11-19  0:43 ` ✓ CI.KUnit: success for " Patchwork
2026-11-19  1:22 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-19  5:12 ` [PATCH] " Tauro, Riana
2026-11-19  5:13   ` Tauro, Riana
2026-11-19  5:19   ` Anirban, Sk

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-221836@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=sk.anirban@intel.com \
    /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.