From: Greg Kroah-Hartman Date: Mon, 11 Jun 2018 05:26:57 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v4.17.1~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e9d60e082c0acc7a3278c8f0e122b80ad566a2db;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: drm-set-fmode_unsigned_offset-for-drm-files.patch --- diff --git a/queue-4.4/drm-set-fmode_unsigned_offset-for-drm-files.patch b/queue-4.4/drm-set-fmode_unsigned_offset-for-drm-files.patch new file mode 100644 index 00000000000..a0391926393 --- /dev/null +++ b/queue-4.4/drm-set-fmode_unsigned_offset-for-drm-files.patch @@ -0,0 +1,36 @@ +From 76ef6b28ea4f81c3d511866a9b31392caa833126 Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Tue, 15 May 2018 13:38:15 +1000 +Subject: drm: set FMODE_UNSIGNED_OFFSET for drm files + +From: Dave Airlie + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/drm_fops.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/gpu/drm/drm_fops.c ++++ b/drivers/gpu/drm/drm_fops.c +@@ -209,6 +209,7 @@ static int drm_open_helper(struct file * + return -ENOMEM; + + filp->private_data = priv; ++ filp->f_mode |= FMODE_UNSIGNED_OFFSET; + priv->filp = filp; + priv->uid = current_euid(); + priv->pid = get_pid(task_pid(current)); diff --git a/queue-4.4/series b/queue-4.4/series index a2af7375eb5..88d344361ff 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -4,3 +4,4 @@ mmap-introduce-sane-default-mmap-limits.patch mmap-relax-file-size-limit-for-regular-files.patch kconfig-avoid-format-overflow-warning-from-gcc-8.1.patch xfs-fix-incorrect-log_flushed-on-fsync.patch +drm-set-fmode_unsigned_offset-for-drm-files.patch