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] [day] [month] [year] [list]
Date:   Tue, 22 Dec 2020 00:11:29 +0200
From:   Stanimir Varbanov <stanimir.varbanov@...aro.org>
To:     Dikshita Agarwal <dikshita@...eaurora.org>,
        linux-media@...r.kernel.org, stanimir.varbanov@...aro.org
Cc:     linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        vgarodia@...eaurora.org
Subject: Re: [PATCH v2] venus: venc: set inband mode property to FW.



On 12/16/20 8:49 AM, Dikshita Agarwal wrote:
> set HFI_PROPERTY_CONFIG_VENC_SYNC_FRAME_SEQUENCE_HEADER to FW
> to support inband sequence header mode.
> 
> Signed-off-by: Dikshita Agarwal <dikshita@...eaurora.org>
> 
> Changes since v1:
> - added codec check 
> - fixed the mask while initializing the control
> 
> ---
>  drivers/media/platform/qcom/venus/venc_ctrls.c | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
> index cf860e6..a94f5fd 100644
> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c
> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
> @@ -157,7 +157,17 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl)
>  		ctr->h264_loop_filter_mode = ctrl->val;
>  		break;
>  	case V4L2_CID_MPEG_VIDEO_HEADER_MODE:
> -		ctr->header_mode = ctrl->val;
> +		if (inst->fmt_cap->pixfmt == V4L2_PIX_FMT_H264 ||
> +		    inst->fmt_cap->pixfmt == V4L2_PIX_FMT_HEVC) {
> +			if (ctrl->val == V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE)
> +				en.enable = 0;
> +			else
> +				en.enable = 1;
> +			ptype = HFI_PROPERTY_CONFIG_VENC_SYNC_FRAME_SEQUENCE_HEADER;
> +			ret = hfi_session_set_property(inst, ptype, &en);
> +			if (ret)
> +				return ret;
> +		}

I see NULL pointer dereference in this code snippet.  Please take as
reference the implementation of V4L2_CID_MPEG_VIDEO_BITRATE from the
same function (venc_op_s_ctrl).

>  		break;
>  	case V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB:
>  		break;
> @@ -289,7 +299,8 @@ int venc_ctrl_init(struct venus_inst *inst)
>  	v4l2_ctrl_new_std_menu(&inst->ctrl_handler, &venc_ctrl_ops,
>  		V4L2_CID_MPEG_VIDEO_HEADER_MODE,
>  		V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME,
> -		1 << V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME,
> +		~((1 << V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE) |
> +		(1 << V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME)),
>  		V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE);
>  
>  	v4l2_ctrl_new_std_menu(&inst->ctrl_handler, &venc_ctrl_ops,
> 

-- 
regards,
Stan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ