lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0f08867b-7724-cb76-d621-0bbe4d5fdc64@quicinc.com>
Date: Tue, 29 Apr 2025 16:16:44 +0530
From: Vikash Garodia <quic_vgarodia@...cinc.com>
To: Dikshita Agarwal <quic_dikshita@...cinc.com>,
        Abhinav Kumar
	<quic_abhinavk@...cinc.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Stefan Schmidt <stefan.schmidt@...aro.org>,
        Hans Verkuil
	<hverkuil@...all.nl>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio
	<konradybcio@...nel.org>, Rob Herring <robh@...nel.org>,
        Krzysztof Kozlowski
	<krzk+dt@...nel.org>,
        Conor Dooley <conor+dt@...nel.org>
CC: Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
        Dmitry Baryshkov
	<dmitry.baryshkov@....qualcomm.com>,
        Neil Armstrong
	<neil.armstrong@...aro.org>,
        Nicolas Dufresne
	<nicolas.dufresne@...labora.com>,
        <linux-media@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <20250417-topic-sm8x50-iris-v10-v7-0-f020cb1d0e98@...aro.org>,
        <20250424-qcs8300_iris-v5-0-f118f505c300@...cinc.com>,
        <stable@...r.kernel.org>
Subject: Re: [PATCH v2 18/23] media: iris: Fix buffer preparation failure
 during resolution change


On 4/28/2025 2:59 PM, Dikshita Agarwal wrote:
> When the resolution changes, the driver internally updates the width and
> height, but the client continue to queue buffers with the older
> resolution until the last flag is received. This results in a mismatch
> when the buffers are prepared, causing failure due to outdated size.
> 
> Introduce a check to prevent size validation during buffer preparation
> if a resolution reconfiguration is in progress, to handle this.
> 
> Cc: stable@...r.kernel.org
> Fixes: 17f2a485ca67 ("media: iris: implement vb2 ops for buf_queue and firmware response")
> Signed-off-by: Dikshita Agarwal <quic_dikshita@...cinc.com>
> ---
>  drivers/media/platform/qcom/iris/iris_vb2.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/iris/iris_vb2.c b/drivers/media/platform/qcom/iris/iris_vb2.c
> index 23473cbd0b2e..7671df0e1c69 100644
> --- a/drivers/media/platform/qcom/iris/iris_vb2.c
> +++ b/drivers/media/platform/qcom/iris/iris_vb2.c
> @@ -259,13 +259,14 @@ int iris_vb2_buf_prepare(struct vb2_buffer *vb)
>  			return -EINVAL;
>  	}
>  
> -	if (vb->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE &&
> -	    vb2_plane_size(vb, 0) < iris_get_buffer_size(inst, BUF_OUTPUT))
> -		return -EINVAL;
> -	if (vb->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE &&
> -	    vb2_plane_size(vb, 0) < iris_get_buffer_size(inst, BUF_INPUT))
> -		return -EINVAL;
> -
> +	if (!inst->in_reconfig) {
Remove the flag and replace with state check. With that

Reviewed-by: Vikash Garodia <quic_vgarodia@...cinc.com>

> +		if (vb->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE &&
> +		    vb2_plane_size(vb, 0) < iris_get_buffer_size(inst, BUF_OUTPUT))
> +			return -EINVAL;
> +		if (vb->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE &&
> +		    vb2_plane_size(vb, 0) < iris_get_buffer_size(inst, BUF_INPUT))
> +			return -EINVAL;
> +	}
>  	return 0;
>  }
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ