Messages in this thread | | | Date | Wed, 29 May 2019 14:15:38 +0300 | From | Sakari Ailus <> | Subject | Re: [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
| |