linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 0/3] media: v4l2-subdev: Verify arguments in v4l2_subdev_call()
Date: Wed, 29 May 2019 14:15:38 +0300	[thread overview]
Message-ID: <20190529111538.uny5x4fulzi4rd2w@paasikivi.fi.intel.com> (raw)
In-Reply-To: <20190520212747.368-1-jmkrzyszt@gmail.com>

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

  parent reply	other threads:[~2019-05-29 11:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20 21:27 [PATCH v7 0/3] media: v4l2-subdev: Verify arguments in v4l2_subdev_call() Janusz Krzysztofik
2019-05-20 21:27 ` [PATCH v7 1/3] " Janusz Krzysztofik
2019-05-20 21:27 ` [PATCH v7 2/3] media: v4l2-subdev: Verify v4l2_subdev_call() pointer arguments Janusz Krzysztofik
2019-05-20 21:27 ` [PATCH v7 3/3] media: v4l2-subdev: Verify v4l2_subdev_call() pad config argument Janusz Krzysztofik
2019-05-29 11:15 ` Sakari Ailus [this message]
2019-06-17 12:53 ` [PATCH v7 0/3] media: v4l2-subdev: Verify arguments in v4l2_subdev_call() Hans Verkuil
2019-06-29  3:28 ` Niklas Söderlund
2019-06-29  9:13   ` Hans Verkuil
  -- strict thread matches above, loose matches on Subject: below --
2019-05-20 20:50 Janusz Krzysztofik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190529111538.uny5x4fulzi4rd2w@paasikivi.fi.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jmkrzyszt@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).