]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Dec 2017 17:46:51 +0000 (18:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Dec 2017 17:46:51 +0000 (18:46 +0100)
added patches:
drm-amdgpu-use-unsigned-ring-indices-in-amdgpu_queue_mgr_map.patch

queue-4.14/drm-amdgpu-use-unsigned-ring-indices-in-amdgpu_queue_mgr_map.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/drm-amdgpu-use-unsigned-ring-indices-in-amdgpu_queue_mgr_map.patch b/queue-4.14/drm-amdgpu-use-unsigned-ring-indices-in-amdgpu_queue_mgr_map.patch
new file mode 100644 (file)
index 0000000..3cd189d
--- /dev/null
@@ -0,0 +1,68 @@
+From fa7c7939b4bf112cd06ba166b739244077898990 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
+Date: Wed, 22 Nov 2017 15:55:21 +0100
+Subject: drm/amdgpu: Use unsigned ring indices in amdgpu_queue_mgr_map
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Michel Dänzer <michel.daenzer@amd.com>
+
+commit fa7c7939b4bf112cd06ba166b739244077898990 upstream.
+
+This matches the corresponding UAPI fields. Treating the ring index as
+signed could result in accessing random unrelated memory if the MSB was
+set.
+
+Fixes: effd924d2f3b ("drm/amdgpu: untie user ring ids from kernel ring ids v6")
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu.h           |    2 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c |    6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+@@ -697,7 +697,7 @@ int amdgpu_queue_mgr_fini(struct amdgpu_
+                         struct amdgpu_queue_mgr *mgr);
+ int amdgpu_queue_mgr_map(struct amdgpu_device *adev,
+                        struct amdgpu_queue_mgr *mgr,
+-                       int hw_ip, int instance, int ring,
++                       u32 hw_ip, u32 instance, u32 ring,
+                        struct amdgpu_ring **out_ring);
+ /*
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c
+@@ -63,7 +63,7 @@ static int amdgpu_update_cached_map(stru
+ static int amdgpu_identity_map(struct amdgpu_device *adev,
+                              struct amdgpu_queue_mapper *mapper,
+-                             int ring,
++                             u32 ring,
+                              struct amdgpu_ring **out_ring)
+ {
+       switch (mapper->hw_ip) {
+@@ -121,7 +121,7 @@ static enum amdgpu_ring_type amdgpu_hw_i
+ static int amdgpu_lru_map(struct amdgpu_device *adev,
+                         struct amdgpu_queue_mapper *mapper,
+-                        int user_ring,
++                        u32 user_ring,
+                         struct amdgpu_ring **out_ring)
+ {
+       int r, i, j;
+@@ -208,7 +208,7 @@ int amdgpu_queue_mgr_fini(struct amdgpu_
+  */
+ int amdgpu_queue_mgr_map(struct amdgpu_device *adev,
+                        struct amdgpu_queue_mgr *mgr,
+-                       int hw_ip, int instance, int ring,
++                       u32 hw_ip, u32 instance, u32 ring,
+                        struct amdgpu_ring **out_ring)
+ {
+       int r, ip_num_rings;
index 126462b299d09e3ffaee8a3b9d9c19369160bb75..9208060102812cca352903f815487c9e714ad896 100644 (file)
@@ -1,2 +1,3 @@
 drm-fsl-dcu-avoid-disabling-pixel-clock-twice-on-suspend.patch
 drm-fsl-dcu-enable-irq-before-drm_atomic_helper_resume.patch
+drm-amdgpu-use-unsigned-ring-indices-in-amdgpu_queue_mgr_map.patch