]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jul 2026 10:55:23 +0000 (12:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jul 2026 10:55:23 +0000 (12:55 +0200)
added patches:
drm-amdgpu-fix-amdgpu_bo_move-when-old_mem-and-new_mem-are-both-gtt.patch
drm-i915-gem-add-missing-nospec-on-parallel-submit-slot.patch
drm-nouveau-acr-fix-missing-nvkm_done-in-error-path-of-nvkm_acr_oneinit.patch
drm-radeon-fix-r100_copy_blit-for-large-bos.patch

queue-6.1/drm-amdgpu-fix-amdgpu_bo_move-when-old_mem-and-new_mem-are-both-gtt.patch [new file with mode: 0644]
queue-6.1/drm-i915-gem-add-missing-nospec-on-parallel-submit-slot.patch [new file with mode: 0644]
queue-6.1/drm-nouveau-acr-fix-missing-nvkm_done-in-error-path-of-nvkm_acr_oneinit.patch [new file with mode: 0644]
queue-6.1/drm-radeon-fix-r100_copy_blit-for-large-bos.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/drm-amdgpu-fix-amdgpu_bo_move-when-old_mem-and-new_mem-are-both-gtt.patch b/queue-6.1/drm-amdgpu-fix-amdgpu_bo_move-when-old_mem-and-new_mem-are-both-gtt.patch
new file mode 100644 (file)
index 0000000..a7709ee
--- /dev/null
@@ -0,0 +1,60 @@
+From ee94a65f192c05c543b4d3ad7137cd696b5c18fc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timur=20Krist=C3=B3f?= <timur.kristof@gmail.com>
+Date: Mon, 25 May 2026 13:33:18 +0200
+Subject: drm/amdgpu: Fix amdgpu_bo_move() when old_mem and new_mem are both GTT
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Timur Kristóf <timur.kristof@gmail.com>
+
+commit ee94a65f192c05c543b4d3ad7137cd696b5c18fc upstream.
+
+The UVD code relies on GTT to GTT moves in order to ensure
+that its BOs don't cross 256M segments.
+
+Fixes: bfe5e585b44f ("drm/ttm: move last binding into the drivers.")
+Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+(cherry picked from commit 21fd45e5e2628d00b478590bcc3d14d3de5d45b6)
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c |   18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+@@ -463,6 +463,15 @@ static int amdgpu_bo_move(struct ttm_buf
+       if (new_mem->mem_type == TTM_PL_TT ||
+           new_mem->mem_type == AMDGPU_PL_PREEMPT) {
++              if (old_mem && (old_mem->mem_type == TTM_PL_TT ||
++                              old_mem->mem_type == AMDGPU_PL_PREEMPT)) {
++                      r = ttm_bo_wait_ctx(bo, ctx);
++                      if (r)
++                              return r;
++
++                      amdgpu_ttm_backend_unbind(bo->bdev, bo->ttm);
++              }
++
+               r = amdgpu_ttm_backend_bind(bo->bdev, bo->ttm, new_mem);
+               if (r)
+                       return r;
+@@ -499,6 +508,15 @@ static int amdgpu_bo_move(struct ttm_buf
+               amdgpu_bo_move_notify(bo, evict, new_mem);
+               ttm_resource_free(bo, &bo->resource);
+               ttm_bo_assign_mem(bo, new_mem);
++              return 0;
++      }
++      if ((old_mem->mem_type == TTM_PL_TT ||
++           old_mem->mem_type == AMDGPU_PL_PREEMPT) &&
++          (new_mem->mem_type == TTM_PL_TT ||
++           new_mem->mem_type == AMDGPU_PL_PREEMPT)) {
++              amdgpu_bo_move_notify(bo, evict, new_mem);
++              ttm_resource_free(bo, &bo->resource);
++              ttm_bo_assign_mem(bo, new_mem);
+               return 0;
+       }
diff --git a/queue-6.1/drm-i915-gem-add-missing-nospec-on-parallel-submit-slot.patch b/queue-6.1/drm-i915-gem-add-missing-nospec-on-parallel-submit-slot.patch
new file mode 100644 (file)
index 0000000..b67e074
--- /dev/null
@@ -0,0 +1,41 @@
+From 914a76a9f08366434bf595700f62026b7a19a9cc Mon Sep 17 00:00:00 2001
+From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
+Date: Mon, 22 Jun 2026 16:25:39 +0300
+Subject: drm/i915/gem: Add missing nospec on parallel submit slot
+
+From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
+
+commit 914a76a9f08366434bf595700f62026b7a19a9cc upstream.
+
+Add missing Spectre mitigation for userspace controlled parallel
+submission slot.
+
+Discovered using AI-assisted static analysis confirmed by Intel
+Product Security.
+
+Reported-by: Martin Hodo <martin.hodo@intel.com>
+Fixes: e5e32171a2cf ("drm/i915/guc: Connect UAPI to GuC multi-lrc interface")
+Cc: Matthew Brost <matthew.brost@intel.com>
+Cc: Tvrtko Ursulin <tursulin@ursulin.net>
+Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
+Reviewed-by: Matthew Brost <matthew.brost@intel.com>
+Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
+Cc: <stable@vger.kernel.org> # v5.16+
+Link: https://patch.msgid.link/20260622132539.165558-1-joonas.lahtinen@linux.intel.com
+(cherry picked from commit 15b9353deff3cf72331c387780de3cf9c316b643)
+Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/i915/gem/i915_gem_context.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
++++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
+@@ -610,6 +610,7 @@ set_proto_ctx_engines_parallel_submit(st
+               return -EINVAL;
+       }
++      slot = array_index_nospec(slot, set->num_engines);
+       if (set->engines[slot].type != I915_GEM_ENGINE_TYPE_INVALID) {
+               drm_dbg(&i915->drm,
+                       "Invalid placement[%d], already occupied\n", slot);
diff --git a/queue-6.1/drm-nouveau-acr-fix-missing-nvkm_done-in-error-path-of-nvkm_acr_oneinit.patch b/queue-6.1/drm-nouveau-acr-fix-missing-nvkm_done-in-error-path-of-nvkm_acr_oneinit.patch
new file mode 100644 (file)
index 0000000..c982614
--- /dev/null
@@ -0,0 +1,44 @@
+From c3027973f692077a1b66a9fb26d6a7c46c0dc72c Mon Sep 17 00:00:00 2001
+From: Wentao Liang <vulab@iscas.ac.cn>
+Date: Sat, 6 Jun 2026 15:56:06 +0000
+Subject: drm/nouveau/acr: fix missing nvkm_done() in error path of nvkm_acr_oneinit()
+
+From: Wentao Liang <vulab@iscas.ac.cn>
+
+commit c3027973f692077a1b66a9fb26d6a7c46c0dc72c upstream.
+
+In nvkm_acr_oneinit(), nvkm_kmap(acr->wpr) is invoked unconditionally
+at line 309 to obtain a mapping reference. Additionally, when both
+acr->wpr_fw and acr->wpr_comp are present, a second nvkm_kmap() is
+called inside the conditional block. Both mappings are expected to be
+released by nvkm_done(acr->wpr) at line 320 before the function returns
+successfully.
+
+However, when a mismatch is detected during the loop within the
+conditional block, the function returns -EINVAL at line 318 without
+calling nvkm_done(). This results in a leak of the kmap reference(s)
+acquired earlier.
+
+Fix the issue by invoking nvkm_done(acr->wpr) prior to the early return
+to ensure proper release of the mapping references.
+
+Fixes: 22dcda45a3d1 ("drm/nouveau/acr: implement new subdev to replace "secure boot"")
+Cc: stable@vger.kernel.org
+Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
+Link: https://patch.msgid.link/20260606155606.77593-1-vulab@iscas.ac.cn
+Signed-off-by: Danilo Krummrich <dakr@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c
++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c
+@@ -314,6 +314,7 @@ nvkm_acr_oneinit(struct nvkm_subdev *sub
+                                         i, us, fw);
+                       }
+               }
++              nvkm_done(acr->wpr);
+               return -EINVAL;
+       }
+       nvkm_done(acr->wpr);
diff --git a/queue-6.1/drm-radeon-fix-r100_copy_blit-for-large-bos.patch b/queue-6.1/drm-radeon-fix-r100_copy_blit-for-large-bos.patch
new file mode 100644 (file)
index 0000000..925aa13
--- /dev/null
@@ -0,0 +1,82 @@
+From f896e86273dbbebb5eac966b4a201b5c62a02e9a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pavel=20Ondra=C4=8Dka?= <pavel.ondracka@gmail.com>
+Date: Wed, 10 Jun 2026 10:32:45 +0200
+Subject: drm/radeon: fix r100_copy_blit for large BOs
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Pavel Ondračka <pavel.ondracka@gmail.com>
+
+commit f896e86273dbbebb5eac966b4a201b5c62a02e9a upstream.
+
+r100_copy_blit() copies BOs as 1024-pixel-wide ARGB8888 blits, so one
+GPU page becomes one blit row. Large copies are split into chunks of at
+most 8191 rows.
+
+The kernel register header names the packet coordinate dwords SRC_Y_X
+and DST_Y_X. In the BITBLT_MULTI description in
+R5xx_Acceleration_v1.5.pdf docs, these correspond to [SRC_X1 | SRC_Y1]
+and [DST_X1 | DST_Y1], which are signed 13-bit coordinates in the
+-8192..8191 range. The old code kept SRC/DST_PITCH_OFFSET at the BO base
+and used SRC_Y_X/DST_Y_X as the chunk address, so large BO moves could
+exceed that coordinate range.
+
+Compute per-chunk SRC/DST_PITCH_OFFSET bases and emit zero source and
+destination coordinates. r100_copy_blit() already packs
+SRC/DST_PITCH_OFFSET as pitch plus base offset, so large chunk addresses
+belong there rather than in the coordinate fields.
+
+This fixes Prison Architect corruption with 4096x4096 mipped textures
+after they are evicted to GTT under memory pressure on RV530.
+
+Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/6716
+Acked-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+(cherry picked from commit 87be26aee76239c6da03e599f238a426897f78ad)
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/radeon/r100.c |   13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+--- a/drivers/gpu/drm/radeon/r100.c
++++ b/drivers/gpu/drm/radeon/r100.c
+@@ -905,6 +905,7 @@ struct radeon_fence *r100_copy_blit(stru
+ {
+       struct radeon_ring *ring = &rdev->ring[RADEON_RING_TYPE_GFX_INDEX];
+       struct radeon_fence *fence;
++      uint64_t cur_src_offset, cur_dst_offset;
+       uint32_t cur_pages;
+       uint32_t stride_bytes = RADEON_GPU_PAGE_SIZE;
+       uint32_t pitch;
+@@ -933,6 +934,10 @@ struct radeon_fence *r100_copy_blit(stru
+                       cur_pages = 8191;
+               }
+               num_gpu_pages -= cur_pages;
++              cur_src_offset = src_offset +
++                      (uint64_t)num_gpu_pages * RADEON_GPU_PAGE_SIZE;
++              cur_dst_offset = dst_offset +
++                      (uint64_t)num_gpu_pages * RADEON_GPU_PAGE_SIZE;
+               /* pages are in Y direction - height
+                  page width in X direction - width */
+@@ -949,13 +954,13 @@ struct radeon_fence *r100_copy_blit(stru
+                                 RADEON_DP_SRC_SOURCE_MEMORY |
+                                 RADEON_GMC_CLR_CMP_CNTL_DIS |
+                                 RADEON_GMC_WR_MSK_DIS);
+-              radeon_ring_write(ring, (pitch << 22) | (src_offset >> 10));
+-              radeon_ring_write(ring, (pitch << 22) | (dst_offset >> 10));
++              radeon_ring_write(ring, (pitch << 22) | (cur_src_offset >> 10));
++              radeon_ring_write(ring, (pitch << 22) | (cur_dst_offset >> 10));
+               radeon_ring_write(ring, (0x1fff) | (0x1fff << 16));
+               radeon_ring_write(ring, 0);
+               radeon_ring_write(ring, (0x1fff) | (0x1fff << 16));
+-              radeon_ring_write(ring, num_gpu_pages);
+-              radeon_ring_write(ring, num_gpu_pages);
++              radeon_ring_write(ring, 0);
++              radeon_ring_write(ring, 0);
+               radeon_ring_write(ring, cur_pages | (stride_pixels << 16));
+       }
+       radeon_ring_write(ring, PACKET0(RADEON_DSTCACHE_CTLSTAT, 0));
index e17eae78eebf851157eb66c6fd9a53487905ff76..b0478da01d8cf4a0e42cffc3fc58a9be48c29692 100644 (file)
@@ -171,3 +171,7 @@ drm-rockchip-cdn-dp-add-missing-check-in-cdn_dp_config_video.patch
 drm-dp-mst-fix-oob-reads-in-remote-dpcd-i2c-sideband-reply-parsers.patch
 drm-dp-mst-fix-buffer-overflows-in-sideband-chunk-accumulation.patch
 drm-dp-mst-fix-oob-reads-on-2-byte-fields-in-sideband-reply-parsers.patch
+drm-amdgpu-fix-amdgpu_bo_move-when-old_mem-and-new_mem-are-both-gtt.patch
+drm-i915-gem-add-missing-nospec-on-parallel-submit-slot.patch
+drm-nouveau-acr-fix-missing-nvkm_done-in-error-path-of-nvkm_acr_oneinit.patch
+drm-radeon-fix-r100_copy_blit-for-large-bos.patch