linux/drivers/gpu/drm/omapdrm
Thierry Reding bdb2b933f2 drm/omap: gem: dumb: pitch is an output
When creating a dumb buffer object using the DRM_IOCTL_MODE_CREATE_DUMB
IOCTL, only the width, height, bpp and flags fields are inputs. The
caller is not guaranteed to zero out or set handle, pitch and size.
Drivers must not treat these values as possible inputs, otherwise they
may use uninitialized memory during the computation of the framebuffer
size.

The OMAP driver uses the pitch field passed in by userspace as a minimum
and only override it if the driver-computed pitch is larger than what
userspace provided. To prevent this from causing overallocation, fix the
minimum pitch to 0 to enforce the driver-computed pitch.

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-13 13:27:22 +01:00
..
Kconfig drm: Add separate Kconfig option for fbdev helpers 2013-10-11 23:36:58 +02:00
Makefile drm/omap: kill omap_gem_helpers.c 2013-08-19 10:36:16 +10:00
omap_connector.c fbdev changes for 3.17 2014-08-08 18:09:33 -07:00
omap_crtc.c drm: convert crtc and connection_mutex to ww_mutex (v5) 2014-06-05 09:54:33 +10:00
omap_debugfs.c drm: store the gem vma offset manager in a typed pointer 2014-01-14 12:38:32 +10:00
omap_dmm_priv.h
omap_dmm_tiler.c drm: omapdrm: fix compiler errors 2014-07-22 11:33:30 +10:00
omap_dmm_tiler.h
omap_drv.c drm: add driver->set_busid() callback 2014-09-10 17:43:04 +10:00
omap_drv.h drm: Extract <drm/drm_gem.h> 2014-09-24 11:43:41 +10:00
omap_encoder.c drm/omap: Add infoframe & dvi/hdmi mode support 2014-07-04 11:17:59 +03:00
omap_fb.c drm: Split connection_mutex out of mode_config.mutex (v3) 2014-06-04 13:25:21 +10:00
omap_fbdev.c drm: Introduce drm_fb_helper_prepare() 2014-07-08 11:31:28 +10:00
omap_gem_dmabuf.c dma-buf: use reservation objects 2014-07-08 13:03:20 -07:00
omap_gem.c drm/omap: gem: dumb: pitch is an output 2014-11-13 13:27:22 +01:00
omap_irq.c omapdrm patches for 3.14 2014-01-29 09:37:47 +10:00
omap_plane.c Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next 2014-07-29 20:49:36 +02:00
tcm-sita.c
tcm-sita.h
tcm.h
TODO