]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop amdgpu patches from all trees
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Jan 2019 10:33:41 +0000 (11:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Jan 2019 10:33:41 +0000 (11:33 +0100)
15 files changed:
queue-4.14/drm-amdgpu-validate-user-gem-object-size.patch [deleted file]
queue-4.14/drm-amdgpu-validate-user-pitch-alignment.patch [deleted file]
queue-4.14/series
queue-4.19/drm-amdgpu-validate-user-gem-object-size.patch [deleted file]
queue-4.19/drm-amdgpu-validate-user-pitch-alignment.patch [deleted file]
queue-4.19/series
queue-4.20/drm-amdgpu-validate-user-gem-object-size.patch [deleted file]
queue-4.20/drm-amdgpu-validate-user-pitch-alignment.patch [deleted file]
queue-4.20/series
queue-4.4/drm-amdgpu-validate-user-gem-object-size.patch [deleted file]
queue-4.4/drm-amdgpu-validate-user-pitch-alignment.patch [deleted file]
queue-4.4/series
queue-4.9/drm-amdgpu-validate-user-gem-object-size.patch [deleted file]
queue-4.9/drm-amdgpu-validate-user-pitch-alignment.patch [deleted file]
queue-4.9/series

diff --git a/queue-4.14/drm-amdgpu-validate-user-gem-object-size.patch b/queue-4.14/drm-amdgpu-validate-user-gem-object-size.patch
deleted file mode 100644 (file)
index 268a6ce..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-From c4a32b266da7bb702e60381ca0c35eaddbc89a6c Mon Sep 17 00:00:00 2001
-From: Yu Zhao <yuzhao@google.com>
-Date: Mon, 7 Jan 2019 15:51:15 -0700
-Subject: drm/amdgpu: validate user GEM object size
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Yu Zhao <yuzhao@google.com>
-
-commit c4a32b266da7bb702e60381ca0c35eaddbc89a6c upstream.
-
-When creating frame buffer, userspace may request to attach to a
-previously allocated GEM object that is smaller than what GPU
-requires. Validation must be done to prevent out-of-bound DMA,
-otherwise it could be exploited to reveal sensitive data.
-
-This fix is not done in a common code path because individual
-driver might have different requirement.
-
-Cc: stable@vger.kernel.org # v4.2+
-Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-Signed-off-by: Yu Zhao <yuzhao@google.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_display.c |    8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-@@ -526,6 +526,7 @@ amdgpu_user_framebuffer_create(struct dr
-       struct drm_gem_object *obj;
-       struct amdgpu_framebuffer *amdgpu_fb;
-       int ret;
-+      int height;
-       struct amdgpu_device *adev = dev->dev_private;
-       int cpp = drm_format_plane_cpp(mode_cmd->pixel_format, 0);
-       int pitch = mode_cmd->pitches[0] / cpp;
-@@ -550,6 +551,13 @@ amdgpu_user_framebuffer_create(struct dr
-               return ERR_PTR(-EINVAL);
-       }
-+      height = ALIGN(mode_cmd->height, 8);
-+      if (obj->size < pitch * height) {
-+              DRM_DEBUG_KMS("Invalid GEM size: expecting >= %d but got %zu\n",
-+                            pitch * height, obj->size);
-+              return ERR_PTR(-EINVAL);
-+      }
-+
-       amdgpu_fb = kzalloc(sizeof(*amdgpu_fb), GFP_KERNEL);
-       if (amdgpu_fb == NULL) {
-               drm_gem_object_put_unlocked(obj);
diff --git a/queue-4.14/drm-amdgpu-validate-user-pitch-alignment.patch b/queue-4.14/drm-amdgpu-validate-user-pitch-alignment.patch
deleted file mode 100644 (file)
index d6b1002..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-From 89f23b6efef554766177bf51aa754bce14c3e7da Mon Sep 17 00:00:00 2001
-From: Yu Zhao <yuzhao@google.com>
-Date: Mon, 7 Jan 2019 15:51:14 -0700
-Subject: drm/amdgpu: validate user pitch alignment
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Yu Zhao <yuzhao@google.com>
-
-commit 89f23b6efef554766177bf51aa754bce14c3e7da upstream.
-
-Userspace may request pitch alignment that is not supported by GPU.
-Some requests 32, but GPU ignores it and uses default 64 when cpp is
-4. If GEM object is allocated based on the smaller alignment, GPU
-DMA will go out of bound.
-
-Cc: stable@vger.kernel.org # v4.2+
-Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-Signed-off-by: Yu Zhao <yuzhao@google.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_display.c |   10 ++++++++++
- 1 file changed, 10 insertions(+)
-
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-@@ -526,6 +526,16 @@ amdgpu_user_framebuffer_create(struct dr
-       struct drm_gem_object *obj;
-       struct amdgpu_framebuffer *amdgpu_fb;
-       int ret;
-+      struct amdgpu_device *adev = dev->dev_private;
-+      int cpp = drm_format_plane_cpp(mode_cmd->pixel_format, 0);
-+      int pitch = mode_cmd->pitches[0] / cpp;
-+
-+      pitch = amdgpu_align_pitch(adev, pitch, cpp, false);
-+      if (mode_cmd->pitches[0] != pitch) {
-+              DRM_DEBUG_KMS("Invalid pitch: expecting %d but got %d\n",
-+                            pitch, mode_cmd->pitches[0]);
-+              return ERR_PTR(-EINVAL);
-+      }
-       obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[0]);
-       if (obj ==  NULL) {
index 2bc06e2258220ef46b068482b597d86e38c48122..b10bc23df617cd4377ef5466cf15fb3f777ccb4d 100644 (file)
@@ -17,8 +17,6 @@ acpi-power-skip-duplicate-power-resource-references-in-_prx.patch
 acpi-pmic-xpower-fix-ts-pin-current-source-handling.patch
 i2c-dev-prevent-adapter-retries-and-timeout-being-set-as-minus-value.patch
 drm-fb-helper-partially-bring-back-workaround-for-bugs-of-sdl-1.2.patch
-drm-amdgpu-validate-user-pitch-alignment.patch
-drm-amdgpu-validate-user-gem-object-size.patch
 rbd-don-t-return-0-on-unmap-if-rbd_dev_flag_removing-is-set.patch
 ext4-make-sure-enough-credits-are-reserved-for-dioread_nolock-writes.patch
 ext4-fix-a-potential-fiemap-page-fault-deadlock-w-inline_data.patch
diff --git a/queue-4.19/drm-amdgpu-validate-user-gem-object-size.patch b/queue-4.19/drm-amdgpu-validate-user-gem-object-size.patch
deleted file mode 100644 (file)
index 9ce03bb..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-From c4a32b266da7bb702e60381ca0c35eaddbc89a6c Mon Sep 17 00:00:00 2001
-From: Yu Zhao <yuzhao@google.com>
-Date: Mon, 7 Jan 2019 15:51:15 -0700
-Subject: drm/amdgpu: validate user GEM object size
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Yu Zhao <yuzhao@google.com>
-
-commit c4a32b266da7bb702e60381ca0c35eaddbc89a6c upstream.
-
-When creating frame buffer, userspace may request to attach to a
-previously allocated GEM object that is smaller than what GPU
-requires. Validation must be done to prevent out-of-bound DMA,
-otherwise it could be exploited to reveal sensitive data.
-
-This fix is not done in a common code path because individual
-driver might have different requirement.
-
-Cc: stable@vger.kernel.org # v4.2+
-Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-Signed-off-by: Yu Zhao <yuzhao@google.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_display.c |    8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-@@ -527,6 +527,7 @@ amdgpu_display_user_framebuffer_create(s
-       struct drm_gem_object *obj;
-       struct amdgpu_framebuffer *amdgpu_fb;
-       int ret;
-+      int height;
-       struct amdgpu_device *adev = dev->dev_private;
-       int cpp = drm_format_plane_cpp(mode_cmd->pixel_format, 0);
-       int pitch = mode_cmd->pitches[0] / cpp;
-@@ -551,6 +552,13 @@ amdgpu_display_user_framebuffer_create(s
-               return ERR_PTR(-EINVAL);
-       }
-+      height = ALIGN(mode_cmd->height, 8);
-+      if (obj->size < pitch * height) {
-+              DRM_DEBUG_KMS("Invalid GEM size: expecting >= %d but got %zu\n",
-+                            pitch * height, obj->size);
-+              return ERR_PTR(-EINVAL);
-+      }
-+
-       amdgpu_fb = kzalloc(sizeof(*amdgpu_fb), GFP_KERNEL);
-       if (amdgpu_fb == NULL) {
-               drm_gem_object_put_unlocked(obj);
diff --git a/queue-4.19/drm-amdgpu-validate-user-pitch-alignment.patch b/queue-4.19/drm-amdgpu-validate-user-pitch-alignment.patch
deleted file mode 100644 (file)
index 0f11237..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-From 89f23b6efef554766177bf51aa754bce14c3e7da Mon Sep 17 00:00:00 2001
-From: Yu Zhao <yuzhao@google.com>
-Date: Mon, 7 Jan 2019 15:51:14 -0700
-Subject: drm/amdgpu: validate user pitch alignment
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Yu Zhao <yuzhao@google.com>
-
-commit 89f23b6efef554766177bf51aa754bce14c3e7da upstream.
-
-Userspace may request pitch alignment that is not supported by GPU.
-Some requests 32, but GPU ignores it and uses default 64 when cpp is
-4. If GEM object is allocated based on the smaller alignment, GPU
-DMA will go out of bound.
-
-Cc: stable@vger.kernel.org # v4.2+
-Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-Signed-off-by: Yu Zhao <yuzhao@google.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_display.c |   10 ++++++++++
- 1 file changed, 10 insertions(+)
-
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-@@ -527,6 +527,16 @@ amdgpu_display_user_framebuffer_create(s
-       struct drm_gem_object *obj;
-       struct amdgpu_framebuffer *amdgpu_fb;
-       int ret;
-+      struct amdgpu_device *adev = dev->dev_private;
-+      int cpp = drm_format_plane_cpp(mode_cmd->pixel_format, 0);
-+      int pitch = mode_cmd->pitches[0] / cpp;
-+
-+      pitch = amdgpu_align_pitch(adev, pitch, cpp, false);
-+      if (mode_cmd->pitches[0] != pitch) {
-+              DRM_DEBUG_KMS("Invalid pitch: expecting %d but got %d\n",
-+                            pitch, mode_cmd->pitches[0]);
-+              return ERR_PTR(-EINVAL);
-+      }
-       obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[0]);
-       if (obj ==  NULL) {
index 1db0fcc0a71b6f1c6924874db18e585150750626..0e58af3f2c5281b76de4e9c7cf67081f0c55e14d 100644 (file)
@@ -32,8 +32,6 @@ drm-amd-display-fix-mst-dp_blank-reg_wait-timeout.patch
 drm-fb_helper-allow-leaking-fbdev-smem_start.patch
 drm-fb-helper-partially-bring-back-workaround-for-bugs-of-sdl-1.2.patch
 drm-i915-unwind-failure-on-pinning-the-gen7-ppgtt.patch
-drm-amdgpu-validate-user-pitch-alignment.patch
-drm-amdgpu-validate-user-gem-object-size.patch
 drm-amdgpu-don-t-ignore-rc-from-drm_dp_mst_topology_mgr_resume.patch
 drm-amdgpu-don-t-fail-resume-process-if-resuming-atomic-state-fails.patch
 rbd-don-t-return-0-on-unmap-if-rbd_dev_flag_removing-is-set.patch
diff --git a/queue-4.20/drm-amdgpu-validate-user-gem-object-size.patch b/queue-4.20/drm-amdgpu-validate-user-gem-object-size.patch
deleted file mode 100644 (file)
index 9ce03bb..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-From c4a32b266da7bb702e60381ca0c35eaddbc89a6c Mon Sep 17 00:00:00 2001
-From: Yu Zhao <yuzhao@google.com>
-Date: Mon, 7 Jan 2019 15:51:15 -0700
-Subject: drm/amdgpu: validate user GEM object size
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Yu Zhao <yuzhao@google.com>
-
-commit c4a32b266da7bb702e60381ca0c35eaddbc89a6c upstream.
-
-When creating frame buffer, userspace may request to attach to a
-previously allocated GEM object that is smaller than what GPU
-requires. Validation must be done to prevent out-of-bound DMA,
-otherwise it could be exploited to reveal sensitive data.
-
-This fix is not done in a common code path because individual
-driver might have different requirement.
-
-Cc: stable@vger.kernel.org # v4.2+
-Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-Signed-off-by: Yu Zhao <yuzhao@google.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_display.c |    8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-@@ -527,6 +527,7 @@ amdgpu_display_user_framebuffer_create(s
-       struct drm_gem_object *obj;
-       struct amdgpu_framebuffer *amdgpu_fb;
-       int ret;
-+      int height;
-       struct amdgpu_device *adev = dev->dev_private;
-       int cpp = drm_format_plane_cpp(mode_cmd->pixel_format, 0);
-       int pitch = mode_cmd->pitches[0] / cpp;
-@@ -551,6 +552,13 @@ amdgpu_display_user_framebuffer_create(s
-               return ERR_PTR(-EINVAL);
-       }
-+      height = ALIGN(mode_cmd->height, 8);
-+      if (obj->size < pitch * height) {
-+              DRM_DEBUG_KMS("Invalid GEM size: expecting >= %d but got %zu\n",
-+                            pitch * height, obj->size);
-+              return ERR_PTR(-EINVAL);
-+      }
-+
-       amdgpu_fb = kzalloc(sizeof(*amdgpu_fb), GFP_KERNEL);
-       if (amdgpu_fb == NULL) {
-               drm_gem_object_put_unlocked(obj);
diff --git a/queue-4.20/drm-amdgpu-validate-user-pitch-alignment.patch b/queue-4.20/drm-amdgpu-validate-user-pitch-alignment.patch
deleted file mode 100644 (file)
index 0f11237..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-From 89f23b6efef554766177bf51aa754bce14c3e7da Mon Sep 17 00:00:00 2001
-From: Yu Zhao <yuzhao@google.com>
-Date: Mon, 7 Jan 2019 15:51:14 -0700
-Subject: drm/amdgpu: validate user pitch alignment
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Yu Zhao <yuzhao@google.com>
-
-commit 89f23b6efef554766177bf51aa754bce14c3e7da upstream.
-
-Userspace may request pitch alignment that is not supported by GPU.
-Some requests 32, but GPU ignores it and uses default 64 when cpp is
-4. If GEM object is allocated based on the smaller alignment, GPU
-DMA will go out of bound.
-
-Cc: stable@vger.kernel.org # v4.2+
-Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-Signed-off-by: Yu Zhao <yuzhao@google.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_display.c |   10 ++++++++++
- 1 file changed, 10 insertions(+)
-
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-@@ -527,6 +527,16 @@ amdgpu_display_user_framebuffer_create(s
-       struct drm_gem_object *obj;
-       struct amdgpu_framebuffer *amdgpu_fb;
-       int ret;
-+      struct amdgpu_device *adev = dev->dev_private;
-+      int cpp = drm_format_plane_cpp(mode_cmd->pixel_format, 0);
-+      int pitch = mode_cmd->pitches[0] / cpp;
-+
-+      pitch = amdgpu_align_pitch(adev, pitch, cpp, false);
-+      if (mode_cmd->pitches[0] != pitch) {
-+              DRM_DEBUG_KMS("Invalid pitch: expecting %d but got %d\n",
-+                            pitch, mode_cmd->pitches[0]);
-+              return ERR_PTR(-EINVAL);
-+      }
-       obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[0]);
-       if (obj ==  NULL) {
index 80476f446d364a2b1f6edd077558de427f17b98c..bd47774987a4165afe5dfeb242adbd4e3395310d 100644 (file)
@@ -41,8 +41,6 @@ pci-dwc-move-interrupt-acking-into-the-proper-callback.patch
 drm-amd-display-fix-mst-dp_blank-reg_wait-timeout.patch
 drm-fb-helper-partially-bring-back-workaround-for-bugs-of-sdl-1.2.patch
 drm-i915-unwind-failure-on-pinning-the-gen7-ppgtt.patch
-drm-amdgpu-validate-user-pitch-alignment.patch
-drm-amdgpu-validate-user-gem-object-size.patch
 drm-amdgpu-don-t-ignore-rc-from-drm_dp_mst_topology_mgr_resume.patch
 drm-amdgpu-don-t-fail-resume-process-if-resuming-atomic-state-fails.patch
 rbd-don-t-return-0-on-unmap-if-rbd_dev_flag_removing-is-set.patch
diff --git a/queue-4.4/drm-amdgpu-validate-user-gem-object-size.patch b/queue-4.4/drm-amdgpu-validate-user-gem-object-size.patch
deleted file mode 100644 (file)
index 17bd27c..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-From c4a32b266da7bb702e60381ca0c35eaddbc89a6c Mon Sep 17 00:00:00 2001
-From: Yu Zhao <yuzhao@google.com>
-Date: Mon, 7 Jan 2019 15:51:15 -0700
-Subject: drm/amdgpu: validate user GEM object size
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Yu Zhao <yuzhao@google.com>
-
-commit c4a32b266da7bb702e60381ca0c35eaddbc89a6c upstream.
-
-When creating frame buffer, userspace may request to attach to a
-previously allocated GEM object that is smaller than what GPU
-requires. Validation must be done to prevent out-of-bound DMA,
-otherwise it could be exploited to reveal sensitive data.
-
-This fix is not done in a common code path because individual
-driver might have different requirement.
-
-Cc: stable@vger.kernel.org # v4.2+
-Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-Signed-off-by: Yu Zhao <yuzhao@google.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_display.c |    8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-@@ -552,6 +552,7 @@ amdgpu_user_framebuffer_create(struct dr
-       struct drm_gem_object *obj;
-       struct amdgpu_framebuffer *amdgpu_fb;
-       int ret;
-+      int height;
-       struct amdgpu_device *adev = dev->dev_private;
-       int cpp = drm_format_plane_cpp(mode_cmd->pixel_format, 0);
-       int pitch = mode_cmd->pitches[0] / cpp;
-@@ -576,6 +577,13 @@ amdgpu_user_framebuffer_create(struct dr
-               return ERR_PTR(-EINVAL);
-       }
-+      height = ALIGN(mode_cmd->height, 8);
-+      if (obj->size < pitch * height) {
-+              DRM_DEBUG_KMS("Invalid GEM size: expecting >= %d but got %zu\n",
-+                            pitch * height, obj->size);
-+              return ERR_PTR(-EINVAL);
-+      }
-+
-       amdgpu_fb = kzalloc(sizeof(*amdgpu_fb), GFP_KERNEL);
-       if (amdgpu_fb == NULL) {
-               drm_gem_object_unreference_unlocked(obj);
diff --git a/queue-4.4/drm-amdgpu-validate-user-pitch-alignment.patch b/queue-4.4/drm-amdgpu-validate-user-pitch-alignment.patch
deleted file mode 100644 (file)
index 317d468..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-From 89f23b6efef554766177bf51aa754bce14c3e7da Mon Sep 17 00:00:00 2001
-From: Yu Zhao <yuzhao@google.com>
-Date: Mon, 7 Jan 2019 15:51:14 -0700
-Subject: drm/amdgpu: validate user pitch alignment
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Yu Zhao <yuzhao@google.com>
-
-commit 89f23b6efef554766177bf51aa754bce14c3e7da upstream.
-
-Userspace may request pitch alignment that is not supported by GPU.
-Some requests 32, but GPU ignores it and uses default 64 when cpp is
-4. If GEM object is allocated based on the smaller alignment, GPU
-DMA will go out of bound.
-
-Cc: stable@vger.kernel.org # v4.2+
-Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-Signed-off-by: Yu Zhao <yuzhao@google.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_display.c |   10 ++++++++++
- 1 file changed, 10 insertions(+)
-
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-@@ -552,6 +552,16 @@ amdgpu_user_framebuffer_create(struct dr
-       struct drm_gem_object *obj;
-       struct amdgpu_framebuffer *amdgpu_fb;
-       int ret;
-+      struct amdgpu_device *adev = dev->dev_private;
-+      int cpp = drm_format_plane_cpp(mode_cmd->pixel_format, 0);
-+      int pitch = mode_cmd->pitches[0] / cpp;
-+
-+      pitch = amdgpu_align_pitch(adev, pitch, cpp, false);
-+      if (mode_cmd->pitches[0] != pitch) {
-+              DRM_DEBUG_KMS("Invalid pitch: expecting %d but got %d\n",
-+                            pitch, mode_cmd->pitches[0]);
-+              return ERR_PTR(-EINVAL);
-+      }
-       obj = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]);
-       if (obj ==  NULL) {
index fd9b11f5fea69a0d29d336d3b2c6368a3ffc6c19..dc052f343cb0b70204e321cdc02c6af1af665452 100644 (file)
@@ -47,6 +47,4 @@ pci-altera-move-retrain-from-fixup-to-altera_pcie_host_init.patch
 acpi-power-skip-duplicate-power-resource-references-in-_prx.patch
 i2c-dev-prevent-adapter-retries-and-timeout-being-set-as-minus-value.patch
 crypto-cts-fix-crash-on-short-inputs.patch
-drm-amdgpu-validate-user-pitch-alignment.patch
-drm-amdgpu-validate-user-gem-object-size.patch
 ext4-fix-a-potential-fiemap-page-fault-deadlock-w-inline_data.patch
diff --git a/queue-4.9/drm-amdgpu-validate-user-gem-object-size.patch b/queue-4.9/drm-amdgpu-validate-user-gem-object-size.patch
deleted file mode 100644 (file)
index d194680..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-From c4a32b266da7bb702e60381ca0c35eaddbc89a6c Mon Sep 17 00:00:00 2001
-From: Yu Zhao <yuzhao@google.com>
-Date: Mon, 7 Jan 2019 15:51:15 -0700
-Subject: drm/amdgpu: validate user GEM object size
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Yu Zhao <yuzhao@google.com>
-
-commit c4a32b266da7bb702e60381ca0c35eaddbc89a6c upstream.
-
-When creating frame buffer, userspace may request to attach to a
-previously allocated GEM object that is smaller than what GPU
-requires. Validation must be done to prevent out-of-bound DMA,
-otherwise it could be exploited to reveal sensitive data.
-
-This fix is not done in a common code path because individual
-driver might have different requirement.
-
-Cc: stable@vger.kernel.org # v4.2+
-Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-Signed-off-by: Yu Zhao <yuzhao@google.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_display.c |    8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-@@ -525,6 +525,7 @@ amdgpu_user_framebuffer_create(struct dr
-       struct drm_gem_object *obj;
-       struct amdgpu_framebuffer *amdgpu_fb;
-       int ret;
-+      int height;
-       struct amdgpu_device *adev = dev->dev_private;
-       int cpp = drm_format_plane_cpp(mode_cmd->pixel_format, 0);
-       int pitch = mode_cmd->pitches[0] / cpp;
-@@ -549,6 +550,13 @@ amdgpu_user_framebuffer_create(struct dr
-               return ERR_PTR(-EINVAL);
-       }
-+      height = ALIGN(mode_cmd->height, 8);
-+      if (obj->size < pitch * height) {
-+              DRM_DEBUG_KMS("Invalid GEM size: expecting >= %d but got %zu\n",
-+                            pitch * height, obj->size);
-+              return ERR_PTR(-EINVAL);
-+      }
-+
-       amdgpu_fb = kzalloc(sizeof(*amdgpu_fb), GFP_KERNEL);
-       if (amdgpu_fb == NULL) {
-               drm_gem_object_unreference_unlocked(obj);
diff --git a/queue-4.9/drm-amdgpu-validate-user-pitch-alignment.patch b/queue-4.9/drm-amdgpu-validate-user-pitch-alignment.patch
deleted file mode 100644 (file)
index 43c98f6..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-From 89f23b6efef554766177bf51aa754bce14c3e7da Mon Sep 17 00:00:00 2001
-From: Yu Zhao <yuzhao@google.com>
-Date: Mon, 7 Jan 2019 15:51:14 -0700
-Subject: drm/amdgpu: validate user pitch alignment
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Yu Zhao <yuzhao@google.com>
-
-commit 89f23b6efef554766177bf51aa754bce14c3e7da upstream.
-
-Userspace may request pitch alignment that is not supported by GPU.
-Some requests 32, but GPU ignores it and uses default 64 when cpp is
-4. If GEM object is allocated based on the smaller alignment, GPU
-DMA will go out of bound.
-
-Cc: stable@vger.kernel.org # v4.2+
-Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-Signed-off-by: Yu Zhao <yuzhao@google.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_display.c |   10 ++++++++++
- 1 file changed, 10 insertions(+)
-
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
-@@ -525,6 +525,16 @@ amdgpu_user_framebuffer_create(struct dr
-       struct drm_gem_object *obj;
-       struct amdgpu_framebuffer *amdgpu_fb;
-       int ret;
-+      struct amdgpu_device *adev = dev->dev_private;
-+      int cpp = drm_format_plane_cpp(mode_cmd->pixel_format, 0);
-+      int pitch = mode_cmd->pitches[0] / cpp;
-+
-+      pitch = amdgpu_align_pitch(adev, pitch, cpp, false);
-+      if (mode_cmd->pitches[0] != pitch) {
-+              DRM_DEBUG_KMS("Invalid pitch: expecting %d but got %d\n",
-+                            pitch, mode_cmd->pitches[0]);
-+              return ERR_PTR(-EINVAL);
-+      }
-       obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[0]);
-       if (obj ==  NULL) {
index 2a02c6d4becd589a016466cb02170e0f0d4a4fef..4eccfed49cf1909cbc422e29e83e9087e122aae2 100644 (file)
@@ -9,8 +9,6 @@ slab-alien-caches-must-not-be-initialized-if-the-allocation-of-the-alien-cache-f
 mm-page_mapped-don-t-assume-compound-page-is-huge-or-thp.patch
 acpi-power-skip-duplicate-power-resource-references-in-_prx.patch
 i2c-dev-prevent-adapter-retries-and-timeout-being-set-as-minus-value.patch
-drm-amdgpu-validate-user-pitch-alignment.patch
-drm-amdgpu-validate-user-gem-object-size.patch
 rbd-don-t-return-0-on-unmap-if-rbd_dev_flag_removing-is-set.patch
 ext4-make-sure-enough-credits-are-reserved-for-dioread_nolock-writes.patch
 ext4-fix-a-potential-fiemap-page-fault-deadlock-w-inline_data.patch