Re: [PATCH] media: rppx1: Validate and process a copy of the parameters buffer

From: Hyeonjun Hong

Date: Wed Dec 02 2026 - 11:54:46 EST


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.

Would that work for you?

Thanks,
Hyeonjun