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

2013-10-17 Thread Chris Wilson
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(st

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

2013-10-17 Thread Pavel Roskin
On Thu, 17 Oct 2013 13:26:47 +0100 Chris Wilson wrote: > 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 wor

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

2013-10-16 Thread Pavel Roskin
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