From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 163E057ED89; Wed, 9 Sep 2026 14:11:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788963062; cv=none; b=lW6sQQgBGg5UyXRg34zZtwaFJ5JsK87cvwNqupNwr00WShC/La92nuINd293iAhYroMd1b6ilDk4xV0RVQcQlym68z1HQPo4C4CbBtNcLC+l67vHywPZ9MKq7T1/3OyVmxnGlnJicCuP7jwmQCNqqXKhGsombUK4gzY7YEVLdlk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788963062; c=relaxed/simple; bh=Er/dy8im9Jt+/u1f+/r29+xgDv+xACvX09pHYvxTJSM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bie5PoNaRyXIa4k56nFFMJgN8SyRhatiCV+LNCLWfsz2dE+gKPbQ4JjNBxhTKfT6B48+GM1bhXMO6bE3jVWa7P4Qp0ZcC7dFotaOwCpI0WSlNpYo7kbqYPKiqZ3LbVaQS0I/tvVfQL9pWPOtuSxytEpVTUZnybp7WHeueTcctIA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Iki1v2In; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Iki1v2In" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A5971F00A3A; Wed, 9 Sep 2026 14:11:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1788963061; bh=Fhp1NwMIfk8ABg3kBu5y9JbiiREdhQUeEtDFlXVrVDI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Iki1v2In3MB9gUZJjqMwA0qfMpdgG7zGx7rSOy9CirGLmwe40WhMxMf3S3Fil21Qo MrcHHpFi7ox16GnQMpccjVSXOy2NFH8JNv2Chmbrisyk3xY6uzvd4u4HOSwRI2g9g9 R3hEupVrhWeHQY5Caz/Zuei6ZwOUaejLzv97rWkg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sunil Khatri , Vitaly Prosyak , =?UTF-8?q?Christian=20K=C3=B6nig?= , Alex Deucher Subject: [PATCH 7.2 506/556] drm/amdgpu: fix byte/dword unit mismatch in coredump IB dump Date: Wed, 9 Sep 2026 15:43:06 +0200 Message-ID: <20260909134248.262156439@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260909134230.441546314@linuxfoundation.org> References: <20260909134230.441546314@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sunil Khatri commit 3b5c4f4a479d0e58a7500cbd2b09d62f719f48b8 upstream. In amdgpu_devcoredump_print_ibs(), the NO_CPU_ACCESS VRAM path passed cursor.start/4 and cursor.size/4 to amdgpu_device_mm_access(), but that function's pos/size parameters are byte offsets/lengths (confirmed by amdgpu_ttm_vram_mm_access() and leading to wrong size calculation. Similarly with that change the off index needs to be calculated based on dword since that is a u32 type. Fixes: 7b15fc2d1f1a ("drm/amdgpu: dump job ibs in the devcoredump") Signed-off-by: Sunil Khatri Reviewed-by: Vitaly Prosyak Acked-by: Christian König Signed-off-by: Alex Deucher (cherry picked from commit 1bd613b0ed98a23575b18674c94b8b3392614681) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c @@ -298,10 +298,10 @@ amdgpu_devcoredump_print_ibs(struct drm_ amdgpu_res_first(abo->tbo.resource, offset, coredump->ibs[i].ib_size_dw * 4, &cursor); while (cursor.remaining) { - amdgpu_device_mm_access(adev, cursor.start / 4, - &ib_content[off], cursor.size / 4, + amdgpu_device_mm_access(adev, cursor.start, + &ib_content[off], cursor.size, false); - off += cursor.size; + off += cursor.size / 4; amdgpu_res_next(&cursor, cursor.size); } emit_content = true;