aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/include/asm/traps.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-10-16 09:49:02 +0100
committerDave Airlie <airlied@redhat.com>2013-10-18 07:42:23 +0100
commitbc5bd37ce48c66e9192ad2e7231e9678880f6f8e (patch)
tree8f8c19df8f6da08bdcf5c9c36db25ebc7c8969a1 /arch/parisc/include/asm/traps.h
parentdrm: Prevent overwriting from userspace underallocating core ioctl structs (diff)
downloadlinux-dev-bc5bd37ce48c66e9192ad2e7231e9678880f6f8e.tar.xz
linux-dev-bc5bd37ce48c66e9192ad2e7231e9678880f6f8e.zip
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>
Diffstat (limited to 'arch/parisc/include/asm/traps.h')
0 files changed, 0 insertions, 0 deletions