Re: [PATCH v2] media: v4l2-ioctl: fix function types for IOCTL_INFO_STD

2018-05-08 Thread Sami Tolvanen
On Tue, May 08, 2018 at 07:22:21PM +0200, Hans Verkuil wrote: > This looks good, I would just rename DEFINE_IOCTL_FNC to DEFINE_V4L_STUB_FUNC. > This makes it clear that it defines a v4l stub function. Sure, sounds good. I'll send v3 shortly. Thanks for the reviews! Sami

Re: [PATCH v2] media: v4l2-ioctl: fix function types for IOCTL_INFO_STD

2018-05-08 Thread Sami Tolvanen
On Tue, May 08, 2018 at 07:22:21PM +0200, Hans Verkuil wrote: > This looks good, I would just rename DEFINE_IOCTL_FNC to DEFINE_V4L_STUB_FUNC. > This makes it clear that it defines a v4l stub function. Sure, sounds good. I'll send v3 shortly. Thanks for the reviews! Sami

Re: [PATCH v2] media: v4l2-ioctl: fix function types for IOCTL_INFO_STD

2018-05-08 Thread Hans Verkuil
On 05/08/2018 07:17 PM, Sami Tolvanen wrote: > On Tue, May 08, 2018 at 10:18:24AM +0200, Hans Verkuil wrote: >> Just call this v4l_stub_g_fbuf, conform the naming of the other functions. >> >> So just replace vidioc_ by v4l_stub_ in all these DEFINE_IOCTL_FNC macros. >> >> This way the function

Re: [PATCH v2] media: v4l2-ioctl: fix function types for IOCTL_INFO_STD

2018-05-08 Thread Hans Verkuil
On 05/08/2018 07:17 PM, Sami Tolvanen wrote: > On Tue, May 08, 2018 at 10:18:24AM +0200, Hans Verkuil wrote: >> Just call this v4l_stub_g_fbuf, conform the naming of the other functions. >> >> So just replace vidioc_ by v4l_stub_ in all these DEFINE_IOCTL_FNC macros. >> >> This way the function

Re: [PATCH v2] media: v4l2-ioctl: fix function types for IOCTL_INFO_STD

2018-05-08 Thread Sami Tolvanen
On Tue, May 08, 2018 at 10:18:24AM +0200, Hans Verkuil wrote: > Just call this v4l_stub_g_fbuf, conform the naming of the other functions. > > So just replace vidioc_ by v4l_stub_ in all these DEFINE_IOCTL_FNC macros. > > This way the function name in the big array matches the name in this

Re: [PATCH v2] media: v4l2-ioctl: fix function types for IOCTL_INFO_STD

2018-05-08 Thread Sami Tolvanen
On Tue, May 08, 2018 at 10:18:24AM +0200, Hans Verkuil wrote: > Just call this v4l_stub_g_fbuf, conform the naming of the other functions. > > So just replace vidioc_ by v4l_stub_ in all these DEFINE_IOCTL_FNC macros. > > This way the function name in the big array matches the name in this

Re: [PATCH v2] media: v4l2-ioctl: fix function types for IOCTL_INFO_STD

2018-05-08 Thread Hans Verkuil
Hi Sami, This looks much better. There is one thing that can be improved further though: On 05/07/2018 10:51 PM, Sami Tolvanen wrote: > This change fixes indirect call mismatches with Control-Flow Integrity > checking, which are caused by calling standard ioctls using a function > pointer that

Re: [PATCH v2] media: v4l2-ioctl: fix function types for IOCTL_INFO_STD

2018-05-08 Thread Hans Verkuil
Hi Sami, This looks much better. There is one thing that can be improved further though: On 05/07/2018 10:51 PM, Sami Tolvanen wrote: > This change fixes indirect call mismatches with Control-Flow Integrity > checking, which are caused by calling standard ioctls using a function > pointer that

[PATCH v2] media: v4l2-ioctl: fix function types for IOCTL_INFO_STD

2018-05-07 Thread Sami Tolvanen
This change fixes indirect call mismatches with Control-Flow Integrity checking, which are caused by calling standard ioctls using a function pointer that doesn't match the type of the actual function. Signed-off-by: Sami Tolvanen ---

[PATCH v2] media: v4l2-ioctl: fix function types for IOCTL_INFO_STD

2018-05-07 Thread Sami Tolvanen
This change fixes indirect call mismatches with Control-Flow Integrity checking, which are caused by calling standard ioctls using a function pointer that doesn't match the type of the actual function. Signed-off-by: Sami Tolvanen --- drivers/media/v4l2-core/v4l2-ioctl.c | 245