]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Jun 2018 05:26:28 +0000 (07:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Jun 2018 05:26:28 +0000 (07:26 +0200)
added patches:
drm-set-fmode_unsigned_offset-for-drm-files.patch

queue-4.14/drm-set-fmode_unsigned_offset-for-drm-files.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/drm-set-fmode_unsigned_offset-for-drm-files.patch b/queue-4.14/drm-set-fmode_unsigned_offset-for-drm-files.patch
new file mode 100644 (file)
index 0000000..d8a2d0c
--- /dev/null
@@ -0,0 +1,36 @@
+From 76ef6b28ea4f81c3d511866a9b31392caa833126 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Tue, 15 May 2018 13:38:15 +1000
+Subject: drm: set FMODE_UNSIGNED_OFFSET for drm files
+
+From: Dave Airlie <airlied@redhat.com>
+
+commit 76ef6b28ea4f81c3d511866a9b31392caa833126 upstream.
+
+Since we have the ttm and gem vma managers using a subset
+of the file address space for objects, and these start at
+0x100000000 they will overflow the new mmap checks.
+
+I've checked all the mmap routines I could see for any
+bad behaviour but overall most people use GEM/TTM VMA
+managers even the legacy drivers have a hashtable.
+
+Reported-and-Tested-by: Arthur Marsh (amarsh04 on #radeon)
+Fixes: be83bbf8068 (mmap: introduce sane default mmap limits)
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/drm_file.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpu/drm/drm_file.c
++++ b/drivers/gpu/drm/drm_file.c
+@@ -212,6 +212,7 @@ static int drm_open_helper(struct file *
+               return -ENOMEM;
+       filp->private_data = priv;
++      filp->f_mode |= FMODE_UNSIGNED_OFFSET;
+       priv->filp = filp;
+       priv->pid = get_pid(task_pid(current));
+       priv->minor = minor;
index d0dd5a6f1ee9ac790b18b51927bcc8e818a02ab3..74202c25077ee3bdda4df2d831d949bfb314582c 100644 (file)
@@ -39,3 +39,4 @@ virtio-net-fix-leaking-page-for-gso-packet-during-mergeable-xdp.patch
 rtnetlink-validate-attributes-in-do_setlink.patch
 cls_flower-fix-incorrect-idr-release-when-failing-to-modify-rule.patch
 pci-hv-do-not-wait-forever-on-a-device-that-has-disappeared.patch
+drm-set-fmode_unsigned_offset-for-drm-files.patch