Linux Media Controller development
 help / color / mirror / Atom feed
From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: Hyeonjun Hong <hyeonjunhong330@gmail.com>
Cc: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>,
	Jai Luthra <jai.luthra+renesas@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Daniel Scally <dan.scally@ideasonboard.com>,
	linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] media: rppx1: Validate and process a copy of the parameters buffer
Date: Wed, 2 Dec 2026 17:57:31 +0100	[thread overview]
Message-ID: <20261202165731.GK3157946@ragnatech.se> (raw)
In-Reply-To: <20261202165419.750564-1-hyeonjunhong330@gmail.com>

On 2026-12-03 01:54:19 +0900, Hyeonjun Hong wrote:
> Hi Niklas,
> 
> Thanks for the quick review.
> 
> On 2026-12-02 17:12:51 +0100, Niklas Söderlund wrote:
> > Can't this be fixed in the v4l2-isp helpers instead of fixing every
> > user?
> 
> Yes, I think it can, and it would be the better end state.
> 
> Today the copy is the driver's job. The kernel-doc of
> v4l2_isp_params_validate_buffer() says drivers should copy the buffer
> to kernel-only memory after v4l2_isp_params_validate_buffer_size() and
> then validate the copy. rkisp1, mali-c55 and c3-isp do that, rppx1 is
> the only user that passes the vb2 plane directly, so this patch only
> fixes one user. But nothing in the helper enforces it.
> 
> A helper that does the size check, the copy and the block validation
> in one call, with the driver passing the destination, would make it
> hard to get wrong.
> 
> That is a larger change though: it touches all four drivers and
> overlaps with Dan's "Introduce v4l2-isp reset buffers" series, and I
> can only compile test the other three drivers. So I would suggest
> taking this patch as the minimal fix for now, and I can look into the
> helper rework once Dan's series has landed.

Can't you base your work on Dan's series and list it as a dependency?

> 
> Would that work for you?
> 
> Thanks,
> Hyeonjun

-- 
Kind Regards,
Niklas Söderlund

  reply	other threads:[~2026-12-02 16:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 15:31 [PATCH] media: rppx1: Validate and process a copy of the parameters buffer Hyeonjun Hong
2026-12-02 16:12 ` Niklas Söderlund
2026-12-02 16:54   ` Hyeonjun Hong
2026-12-02 16:57     ` Niklas Söderlund [this message]
2026-12-02 17:04       ` Hyeonjun Hong

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=20261202165731.GK3157946@ragnatech.se \
    --to=niklas.soderlund@ragnatech.se \
    --cc=dan.scally@ideasonboard.com \
    --cc=hyeonjunhong330@gmail.com \
    --cc=jacopo.mondi+renesas@ideasonboard.com \
    --cc=jai.luthra+renesas@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=stable@vger.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