kernel-fxtec-pro1x/drivers/gpu
Chris Wilson fba4f7c118 drm/i915: Sanity check mmap length against object size
[ Upstream commit 000c4f90e3f0194eef218ff2c6a8fd8ca1de4313 ]

We assumed that vm_mmap() would reject an attempt to mmap past the end of
the filp (our object), but we were wrong.

Applications that tried to use the mmap beyond the end of the object
would be greeted by a SIGBUS. After this patch, those applications will
be told about the error on creating the mmap, rather than at a random
moment on later access.

Reported-by: Antonio Argenziano <antonio.argenziano@intel.com>
Testcase: igt/gem_mmap/bad-size
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: stable@vger.kernel.org
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190314075829.16838-1-chris@chris-wilson.co.uk
(cherry picked from commit 794a11cb67201ad1bb61af510bb8460280feb3f3)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-09-16 08:22:09 +02:00
..
drm drm/i915: Sanity check mmap length against object size 2019-09-16 08:22:09 +02:00
host1x gpu: host1x: Increase maximum DMA segment size 2019-07-31 07:26:59 +02:00
ipu-v3 gpu: ipu-v3: ipu-ic: Fix saturation bit offset in TPMEM 2019-07-26 09:14:29 +02:00
vga vga_switcheroo: Fix missing gpu_bound call at audio client registration 2018-11-13 11:09:00 -08:00
Makefile