From: Greg Kroah-Hartman Date: Wed, 29 Jul 2026 10:55:23 +0000 (+0200) Subject: 6.1-stable patches X-Git-Tag: v6.1.179~72 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=7207d8defee0ada865996be2f20ce8bcd34a6183;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches 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 --- 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 index 0000000000..a7709eebe8 --- /dev/null +++ b/queue-6.1/drm-amdgpu-fix-amdgpu_bo_move-when-old_mem-and-new_mem-are-both-gtt.patch @@ -0,0 +1,60 @@ +From ee94a65f192c05c543b4d3ad7137cd696b5c18fc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timur=20Krist=C3=B3f?= +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 + +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 +Reviewed-by: Christian König +Signed-off-by: Alex Deucher +(cherry picked from commit 21fd45e5e2628d00b478590bcc3d14d3de5d45b6) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 0000000000..b67e07498a --- /dev/null +++ b/queue-6.1/drm-i915-gem-add-missing-nospec-on-parallel-submit-slot.patch @@ -0,0 +1,41 @@ +From 914a76a9f08366434bf595700f62026b7a19a9cc Mon Sep 17 00:00:00 2001 +From: Joonas Lahtinen +Date: Mon, 22 Jun 2026 16:25:39 +0300 +Subject: drm/i915/gem: Add missing nospec on parallel submit slot + +From: Joonas Lahtinen + +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 +Fixes: e5e32171a2cf ("drm/i915/guc: Connect UAPI to GuC multi-lrc interface") +Cc: Matthew Brost +Cc: Tvrtko Ursulin +Signed-off-by: Joonas Lahtinen +Reviewed-by: Matthew Brost +Reviewed-by: Tvrtko Ursulin +Cc: # 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 +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 0000000000..c98261441c --- /dev/null +++ b/queue-6.1/drm-nouveau-acr-fix-missing-nvkm_done-in-error-path-of-nvkm_acr_oneinit.patch @@ -0,0 +1,44 @@ +From c3027973f692077a1b66a9fb26d6a7c46c0dc72c Mon Sep 17 00:00:00 2001 +From: Wentao Liang +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 + +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 +Link: https://patch.msgid.link/20260606155606.77593-1-vulab@iscas.ac.cn +Signed-off-by: Danilo Krummrich +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 0000000000..925aa13cf0 --- /dev/null +++ b/queue-6.1/drm-radeon-fix-r100_copy_blit-for-large-bos.patch @@ -0,0 +1,82 @@ +From f896e86273dbbebb5eac966b4a201b5c62a02e9a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pavel=20Ondra=C4=8Dka?= +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 + +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 +Signed-off-by: Pavel Ondračka +Signed-off-by: Alex Deucher +(cherry picked from commit 87be26aee76239c6da03e599f238a426897f78ad) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + 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)); diff --git a/queue-6.1/series b/queue-6.1/series index e17eae78ee..b0478da01d 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -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