lkml.org 
[lkml]   [2019]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 0/3] media: v4l2-subdev: Verify arguments in v4l2_subdev_call()
Hi Janusz,

On Mon, May 20, 2019 at 11:27:44PM +0200, Janusz Krzysztofik wrote:
> Correctness of format type (try or active) and pad ID parameters passed
> to subdevice operation callbacks is now verified only for IOCTL calls.
> However, those callbacks are also used by drivers, e.g., V4L2 host
> interfaces.
>
> Since both subdev_do_ioctl() and drivers are using v4l2_subdev_call()
> macro while calling subdevice operations, move those parameter checks
> from subdev_do_ioctl() to v4l2_subdev_call(). Also, add check for
> non-NULL pointers, including pad config if V4L2_SUBDEV_FORMAT_TRY is
> requested.
>
> Having that done, we can avoid taking care of those checks inside
> drivers.
>
> Janusz Krzysztofik (3):
> media: v4l2-subdev: Verify arguments in v4l2_subdev_call()
> media: v4l2-subdev: Verify v4l2_subdev_call() pointer arguments
> media: v4l2-subdev: Verify v4l2_subdev_call() pad config argument

For the set:

Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>

On the 1st patch __u32 should be u32. I'd suggest to fix that in a separate
patch.

This was a really nice set. Thank you!

--
Kind regards,

Sakari Ailus
sakari.ailus@linux.intel.com

\
 
 \ /
  Last update: 2019-05-29 13:16    [W:0.079 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site