Re: [PATCH] drm: never write to the userspace more data than the caller wants

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 16, 2013 at 08:12:35PM -0400, Pavel Roskin wrote:
> The amount of data wanted by the userspace caller is encoded in the
> ioctl number.  Generic drm ioctls were ignoring it.
> 
> As a result, Intel Xorg driver didn't work for i386 userspace on x86_64
> kernel on some systems.  sizeof(struct drm_mode_get_connector) is 76
> bytes on i686 and 80 bytes on x86_64 due to the tail alignment (the data
> positions match).  The userspace was using the 4 bytes after the
> structure to hold the result of the ioctl.  Since drm_ioctl() was
> copying 80 bytes instead of 76, it was clobbering that data.
> 
> A workaround has been committed to xf86-video-intel.
> 
> Signed-off-by: Pavel Roskin <proski@xxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx

Similar patch:
http://lists.freedesktop.org/archives/dri-devel/2013-October/047412.html
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux