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