From: sashiko-bot@kernel.org
To: "Mukul Joshi" <mukul.joshi@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCHv3] drm/amdgpu: reject errored peers in UALink local vPod integrity check
Date: Mon, 30 Nov 2026 21:06:48 +0000 [thread overview]
Message-ID: <sashiko-outbox-241970@kernel.org> (raw)
In-Reply-To: <20261130204733.533769-1-mukul.joshi@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/amdgpu: incomplete errored peer check in
__check_local_vpod_integrity()
--
commit afa1dfd6bced3e7e4c6a0f3810602234d791cc37
Author: Mukul Joshi <mukul.joshi@amd.com>
drm/amdgpu: reject errored peers in UALink local vPod integrity check
This commit updates __check_local_vpod_integrity() to check whether a peer
accelerator is in AMDGPU_UALINK_ACCEL_STATE_ERROR before testing its pPod
or vPod configuration states, failing the integrity check if the errored
peer has an out-of-range accel_id or is marked in vpod.active_accel_bits.
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
> index fa4c3d27d2720..2966e501ac120 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
> @@ -1168,17 +1168,30 @@ static int __check_local_vpod_integrity(struct amdgpu_device *adev)
> continue;
>
> peer_info = peer_adev->ualink.info;
> + accel_id = peer_info->ppod.accel_id;
> + /* An errored peer's accel_id may have failed validation, in
> + * which case its vPod membership is unknown: treat it as a
> + * member.
> + */
> + if (peer_info->accel_state == AMDGPU_UALINK_ACCEL_STATE_ERROR) {
> + if (accel_id >= AMDGPU_UALINK_ACCEL_MAX ||
> + test_bit(accel_id, info->vpod.active_accel_bits)) {
> + dev_warn(adev->dev,
> + "UALINK: integrity fail: errored peer accel_id=%u is or may be a vpod member\n",
> + accel_id);
> + return -EINVAL;
> + }
> + continue;
> + }
[Severity: Medium]
Can an errored peer whose pPod failed __check_ppod_info() still be skipped
here when accel_id < AMDGPU_UALINK_ACCEL_MAX?
In amdgpu_ualink_info_set_accel_state(), a peer enters
AMDGPU_UALINK_ACCEL_STATE_ERROR when __check_ppod_info() fails because
ppod.size is 0 or ppod.accel_id >= ppod.size. When info->ppod.size is
smaller than AMDGPU_UALINK_ACCEL_MAX (for example 8) and the errored peer
has an unvalidated accel_id in [info->ppod.size, AMDGPU_UALINK_ACCEL_MAX - 1]
(or ppod.size == 0 and accel_id == 0 when bit 0 is not in this vPod),
accel_id >= AMDGPU_UALINK_ACCEL_MAX and test_bit() are both false. The loop
then skips the peer and activates the vPod even though the peer's accel_id
failed validation and its vPod membership is unknown.
Checking !__check_ppod_info(peer_adev, peer_info) instead of
accel_id >= AMDGPU_UALINK_ACCEL_MAX would catch any unvalidated pPod on an
errored peer before consulting active_accel_bits.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261130204733.533769-1-mukul.joshi@amd.com?part=1
next prev parent reply other threads:[~2026-11-30 21:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 20:43 [PATCHv3] drm/amdgpu: reject errored peers in UALink local vPod integrity check Mukul Joshi
2026-11-30 21:06 ` sashiko-bot [this message]
2026-12-01 3:22 ` Lazar, Lijo
2026-12-01 15:10 ` Joshi, Mukul
2026-12-01 15:19 ` Lazar, Lijo
2026-12-01 15:41 ` Joshi, Mukul
2026-12-01 16:00 ` Kuehling, Felix
2026-12-01 16:38 ` Lazar, Lijo
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-241970@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=amd-gfx@lists.freedesktop.org \
--cc=mukul.joshi@amd.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 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.