Re: [PATCHv2 13/13] v4l2-compat-ioctl32.c: refactor, fix security bug in compat ioctl32

2018-01-30 Thread Hans Verkuil
On 01/30/18 12:46, Sakari Ailus wrote: > Hi Hans, > > Thanks for the update. Please see a few additional comments below. > > On Tue, Jan 30, 2018 at 11:27:01AM +0100, Hans Verkuil wrote: > ... >> @@ -891,30 +1057,53 @@ static long do_video_ioctl(struct file *file, >> unsigned int cmd, unsigned l

Re: [PATCHv2 13/13] v4l2-compat-ioctl32.c: refactor, fix security bug in compat ioctl32

2018-01-30 Thread Sakari Ailus
Hi Hans, Thanks for the update. Please see a few additional comments below. On Tue, Jan 30, 2018 at 11:27:01AM +0100, Hans Verkuil wrote: ... > @@ -891,30 +1057,53 @@ static long do_video_ioctl(struct file *file, unsigned > int cmd, unsigned long ar > case VIDIOC_STREAMOFF: > case VI

[PATCHv2 13/13] v4l2-compat-ioctl32.c: refactor, fix security bug in compat ioctl32

2018-01-30 Thread Hans Verkuil
From: Daniel Mentz The 32-bit compat v4l2 ioctl handling is implemented based on its 64-bit equivalent. It converts 32-bit data structures into its 64-bit equivalents and needs to provide the data to the 64-bit ioctl in user space memory which is commonly allocated using compat_alloc_user_space()