alistair23-linux/include/uapi/drm
Chris Wilson bc5bd37ce4 drm: Pad drm_mode_get_connector to 64-bit boundary
Pavel Roskin reported that DRM_IOCTL_MODE_GETCONNECTOR was overwritting
the 4 bytes beyond the end of its structure with a 32-bit userspace
running on a 64-bit kernel. This is due to the padding gcc inserts as
the drm_mode_get_connector struct includes a u64 and its size is not a
natural multiple of u64s.

64-bit kernel:

sizeof(drm_mode_get_connector)=80, alignof=8
sizeof(drm_mode_get_encoder)=20, alignof=4
sizeof(drm_mode_modeinfo)=68, alignof=4

32-bit userspace:

sizeof(drm_mode_get_connector)=76, alignof=4
sizeof(drm_mode_get_encoder)=20, alignof=4
sizeof(drm_mode_modeinfo)=68, alignof=4

Fortuituously we can insert explicit padding to the tail of our
structures without breaking ABI.

Reported-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Airlie <airlied@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-10-18 07:42:23 +01:00
..
drm.h drm: Advertise async page flip ability through GETCAP ioctl 2013-08-30 09:25:13 +10:00
drm_fourcc.h
drm_mode.h drm: Pad drm_mode_get_connector to 64-bit boundary 2013-10-18 07:42:23 +01:00
drm_sarea.h
exynos_drm.h drm/exynos: consider both case of vflip and hflip. 2013-01-04 15:54:33 +09:00
i810_drm.h
i915_drm.h drm/i915: Use Write-Through cacheing for the display plane on Iris 2013-08-22 13:31:38 +02:00
Kbuild drm/msm: add a3xx gpu support 2013-08-24 14:57:18 -04:00
mga_drm.h
msm_drm.h drm/msm: add a3xx gpu support 2013-08-24 14:57:18 -04:00
nouveau_drm.h
omap_drm.h drm/omap: move out of staging 2013-02-16 17:38:06 -05:00
qxl_drm.h drm: add new QXL driver. (v1.4) 2013-04-12 13:51:07 +10:00
r128_drm.h
radeon_drm.h drm/radeon/cik: Add tiling mode index for 1D tiled depth/stencil surfaces 2013-09-20 17:33:40 -04:00
savage_drm.h
sis_drm.h
tegra_drm.h drm/tegra: Include header drm/drm.h 2013-06-22 12:43:50 +02:00
via_drm.h
vmwgfx_drm.h