[PATCH v4] media: v4l2-ioctl: replace IOCTL_INFO_STD with stub functions

2018-05-08 Thread Sami Tolvanen
This change removes IOCTL_INFO_STD and adds stub functions where needed using the DEFINE_V4L_STUB_FUNC macro. This fixes indirect call mismatches with Control-Flow Integrity, caused by calling standard ioctls using a function pointer that doesn't match the function type. Signed-off-by:

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

2018-05-08 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

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 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 macro,

[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

[PATCH v2] media: media-device: fix ioctl function types

2018-05-07 Thread Sami Tolvanen
This change fixes function types for media device ioctls to avoid indirect call mismatches with Control-Flow Integrity checking. Signed-off-by: Sami Tolvanen --- drivers/media/media-device.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers

[PATCH] media: media-device: fix ioctl function types

2018-04-27 Thread Sami Tolvanen
This change fixes function types for media device ioctls to avoid indirect call mismatches with Control-Flow Integrity checking. Signed-off-by: Sami Tolvanen --- drivers/media/media-device.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers

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

2018-04-27 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